Convert cell array to an array, when the size of the cells is different
5 ビュー (過去 30 日間)
古いコメントを表示
Nikolas Spiliopoulos
2018 年 12 月 4 日
コメント済み: Nikolas Spiliopoulos
2018 年 12 月 4 日
Hi all,
I have a cell array like this A={ [0 0 0 0] ; [1 1] ;[2] }
Is it possible to convert it in an array? I tried with cell2mat but I get an error because the sizes are different
thanks
Nikolas
0 件のコメント
採用された回答
その他の回答 (1 件)
madhan ravi
2018 年 12 月 4 日
[A{:}] % which is eqivalent to horzcat(A{:})
3 件のコメント
madhan ravi
2018 年 12 月 4 日
編集済み: madhan ravi
2018 年 12 月 4 日
just give an example of your desired output in the example you gave! plus how can you put them in an array when the number of columns are different??
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!