cell array in matlab..
1 回表示 (過去 30 日間)
古いコメントを表示
Hi there, I have a cell array in matlab in the form of:
'f2=38.8504'
'f98=39.1628'
'f2=38.8504'
'f98=39.1628'
'f2=38.8504'
'f98=39.1628'
I do not want f2 or f98 I just want the values on the right of the equal sign (=) in a normal array rather than cell array.
Thanks.
2 件のコメント
Oleg Komarov
2012 年 4 月 15 日
Your post is clear, however, considering the effort you put in separating the example input with newlines I think that this post may be of some help: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
採用された回答
Oleg Komarov
2012 年 4 月 15 日
One of the many solutions:
cellfun(@(x,y) str2double(x(y+1:end)),c, regexp(c,'='))
Let us know if the timings are fine.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!