cell to matrix conversion
1 回表示 (過去 30 日間)
古いコメントを表示
I have following cell matrix X(1x4):
[] [] [1,2,3;1,3,4] [1,2,3,4;1,3,4,2]
how do i split them into four seperate matrices?
0 件のコメント
採用された回答
Wayne King
2013 年 5 月 29 日
Then as Azzi says, just extract them in a for loop
X = {[] [] [1,2,3;1,3,4] [1,2,3,4;1,3,4,2]};
for ii = 1:4
size(X{ii}) % do whatever you want here
end
0 件のコメント
その他の回答 (1 件)
Wayne King
2013 年 5 月 29 日
編集済み: Wayne King
2013 年 5 月 29 日
X = {[] [] [1,2,3;1,3,4] [1,2,3,4;1,3,4,2]};
[A,B,C,D] = deal(X{:});
Note that A and B are empty as expected.
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!