Error when applying cell2mat
5 ビュー (過去 30 日間)
古いコメントを表示
I have several columns in a cell array A with double values, and I am applying this very simple formula to get separate variables:
y=cell2mat(ANALLSper(:,2)); %for example
And for somecase ist gives me this error:
Error using cell2mat (line 45)
All contents of the input cell array must be of the same data type.
Does someone know how to solve it? Thank you very much.
1 件のコメント
José-Luis
2014 年 8 月 22 日
It means that not everything in that array is what you think it is. Try looking at that array in the editor.
採用された回答
その他の回答 (1 件)
Image Analyst
2014 年 8 月 23 日
Maybe you don't even need a cell array. Why deal with that complication if you don't have to and you ultimately want to get a double array anyway. Why not just start off using a double array. A cell array is more flexible but more complicated. If you really want the complication of a cell array, read the FAQ: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!