フィルターのクリア

convert text like '(18)' to number

1 回表示 (過去 30 日間)
Stewart Smith
Stewart Smith 2019 年 11 月 8 日
回答済み: Walter Roberson 2019 年 11 月 8 日
is there simple way to extract this text and convert to number?

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 11 月 8 日
S = '(18)';
value = sscanf(S, '(%f' )
You can get more complicated, like,
S = '(18,-3.8)';
value = sscanf(S, '(%f,%f)');

カテゴリ

Help Center および File ExchangeText Data Preparation についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by