我無法將matlab數組轉換爲單元值數組。將Matlab數組轉換爲單元陣列
stacksize = size(resultStack.('f'),1); % 2897 values
exportc = cell(stacksize+1, 4);
exportc{1,1} = 'top';
exportc{1,2} = 'bottom';
exportc{1,3} = 'left';
exportc{1,4} = 'right';
exportc{2:end,:} = mat2cell(resultStack.('f'), 1:stacksize, 1:4);
這結束與錯誤
輸入參數,D1至D2,和必須爲輸入矩陣的大小的每個維度,[2897 4]。
我在做什麼錯?
糟糕+1,我不應該認爲只有一個問題。接得好。 –
@ColinTBowers:如果在我的程序設計中學到了一件事情,那就是* test *,* test *,* test *,* test *,* test *,* test *,* test *,* test *,* test *,*測試*,*測試*,*測試*,*測試*,*測試*,*測試*,*測試*,*測試*,*測試*,然後*測試* –
什麼是合適的meta在這裏?我應該刪除我的答案,還是將它與我目前包含的更新保持一致,並將OP指向您的答案? –