フィルターのクリア

Converting cell array to double?

2 ビュー (過去 30 日間)
Rightia Rollmann
Rightia Rollmann 2016 年 8 月 11 日
編集済み: Azzi Abdelmalek 2016 年 8 月 11 日
How can I convert the cell array A into the column vector B? (Deleting the letter B and leading white spaces)
A = { 'B 1'; 'B 12'; 'B123' }
B = [ 1; 12; 123 ]

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 8 月 11 日
編集済み: Azzi Abdelmalek 2016 年 8 月 11 日
A = { 'B 1'; 'B 12'; 'B123' }
B=str2double(regexp(A,'\d+','match','once'))

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by