フィルターのクリア

Separate a cell into separate numbers

2 ビュー (過去 30 日間)
Raziur Rahman
Raziur Rahman 2015 年 8 月 17 日
回答済み: Walter Roberson 2015 年 8 月 17 日
I have 4 values in a cell format, like this way "-1,-2,-3.4,-4". I would like to separate this 4 values and use them as 4 different number? How can I do that?

採用された回答

Walter Roberson
Walter Roberson 2015 年 8 月 17 日
If "1,-2,-3.4,-4" indicates a comma separated string, then
numstring = '1,-2,-3.4,-4';
numeric_values = sscanf(numstring,'%f,');
after which it is often best to leave them as an array.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by