フィルターのクリア

Convert cell to matrix

2 ビュー (過去 30 日間)
Martin Park
Martin Park 2013 年 10 月 6 日
回答済み: Jan 2013 年 10 月 6 日
I have the following {'128' '256' '157' '54'} How can I convert it to a numeric matrix for example 128 256 157 54
  1 件のコメント
Martin Park
Martin Park 2013 年 10 月 6 日
I mean
128 256
157 54

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2013 年 10 月 6 日

その他の回答 (1 件)

Jan
Jan 2013 年 10 月 6 日
Faster than str2double:
C = {'128' '256' '157' '54'};
S = sprintf('%s*', C{:});
D = sscanf(S, '%g*');

カテゴリ

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