I try the code in the str2num doc but it don't works.. it give me an empty array ! can you help me ?
>> X = str2num ( '12e-3 5.9e-3 -8.1e-3 2.56e-3; 5 11,2 17,9 33' )
X =
[]

 採用された回答

madhan ravi
madhan ravi 2018 年 11 月 9 日
編集済み: madhan ravi 2018 年 11 月 9 日

0 投票

X = str2num( '12e-3 5.9e-3 -8.1e-3 2.56e-3; 5 11.2 17.9 33' ) %edited after kssv's comment

5 件のコメント

madhan ravi
madhan ravi 2018 年 11 月 9 日
編集済み: madhan ravi 2018 年 11 月 9 日
11,9->11.9
17,9->17.9
decimal numbers have to be denoted by dots not commas
KSSV
KSSV 2018 年 11 月 9 日
The square braces are superfluous.
madhan ravi
madhan ravi 2018 年 11 月 9 日
Thank you @KSSV ,edited
Maha Oueghlani
Maha Oueghlani 2018 年 11 月 9 日
Thank's a lot
madhan ravi
madhan ravi 2018 年 11 月 9 日
Anytime :) make sure to accept the answer

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Functions についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by