Convert cell to matrix
1 回表示 (過去 30 日間)
古いコメントを表示
I have the following {'128' '256' '157' '54'} How can I convert it to a numeric matrix for example 128 256 157 54
採用された回答
その他の回答 (1 件)
Jan
2013 年 10 月 6 日
Faster than str2double:
C = {'128' '256' '157' '54'};
S = sprintf('%s*', C{:});
D = sscanf(S, '%g*');
0 件のコメント
参考
カテゴリ
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!