我希望将两个单元阵列连接在一起。我有两个不同大小的矩阵,根据我的理解,将它们连接在一起的唯一可能方式是使用单元阵列。这里是我的代码连接单元阵列
M = magic(3);
B = {magic(3) 'sip' magic(4) magic(3) }
C = {B; ...
B; ...
B; ...
B}
c1 = C{1}{1,1};
c2 = C{1}{1,3};
c{1} = c1; % after extracting matrix from cell array put it it
c{2} = c2; % into another cell array to attempt to concatenate
conca = [c{1};c{2}]; %returns error.
,我发现了以下错误:
??? Error using ==> vertcat
CAT arguments dimensions are not
consistent.
Error in ==> importdata at 26
conca = [c{1};c{2}]; %returns error.
谢谢!我试图在另一组数据上做类似的事情。只是做了一个小例子,它看起来很类似。 – 2013-02-28 14:04:25