我试图在二维单元阵列行末尾添加一个元素。我的代码是:在二维单元阵列中追加八度数
b = cell(5, 0)
b(1) = {b(1, :), 2} % Trying to append at the end of the first row
这给我的错误:error: A(I) = X: X must have the same size as I
我也尝试过各种其他形式,如:
b = cell(5, 0)
b(1, end+1) = 2 % Ok, inserts 2 at [1,1]
b(2, end+1) = 3 % No, inserts 3 at [2,2] instead of [2, 1]
何必'B(2,终端+ 1)= 3'插入'3'在'[1]'? – Shai 2013-05-12 08:36:08
对不起,我的意思是'[2 1]' – 2013-05-12 08:41:55