Convert a cell array into arrays

615 ビュー (過去 30 日間)
Riccardo Tronconi
Riccardo Tronconi 2021 年 10 月 13 日
編集済み: Stephen23 2021 年 10 月 13 日
Dear guys even if this question was similarly answered I cannot find a solution:
I have an cell array A mxn where each array may have different number of columns that's why I cannot use cell2mat.
here what is look like the first row:
[NaN, NaN] [] [2.5, 4] [3.6 , 8]; What I'm looking for is to convert from cell array to array just the 4th column which contains m arrays with dimension 1x2.
Any suggestions?

採用された回答

Stephen23
Stephen23 2021 年 10 月 13 日
編集済み: Stephen23 2021 年 10 月 13 日
Where C is your cell array:
M = vertcat(C{:,4})
or
M = cell2mat(C(:,4))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by