hi i have 1x10 cell,each cell contains 1x2 cell,therefore totally i have 20 cells,i need all these 20 cells to be displayed in single array as 1x20 double ,how to code this in matlab sir,help plz

1 回表示 (過去 30 日間)
i need to do this in loop because i have 20 1x10cells,thanks in advance

採用された回答

Stephen23
Stephen23 2015 年 10 月 1 日
編集済み: Stephen23 2015 年 10 月 1 日
You do not need a loop:
X = {[1,2],[3,4],[4,5]}
[X{:}]
And if those nested arrays really are cell arrays, then simply do this:
Y = {{1,2},{3,4},{4,5}};
cell2mat([Y{:}])

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by