フィルターのクリア

Incorrect behavior of str2num?

1 回表示 (過去 30 日間)
Arjan Lampe
Arjan Lampe 2020 年 5 月 13 日
コメント済み: Arjan Lampe 2020 年 5 月 13 日
Hi,
This seems not to work as intended:
>> str2num('"Y"')
ans =
"Y"
This should return an empty array.
  5 件のコメント
Image Analyst
Image Analyst 2020 年 5 月 13 日
編集済み: Image Analyst 2020 年 5 月 13 日
In r2020a:
>> str2num('"Y"')
ans =
[]
as expected, since it's not a number. So the best answer is to upgrade. Can you do that? Are you on the maintenance plan?
Arjan Lampe
Arjan Lampe 2020 年 5 月 13 日
Well, my company is, but I've just merged to R2018b a month ago or so. So upgrading is not going to happen soon... Anyway, I'll work my way around it then.

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

採用された回答

Fangjun Jiang
Fangjun Jiang 2020 年 5 月 13 日
Seems that way.
>> version
ans =
'9.5.0.1298439 (R2018b) Update 7'
>> str2num('"Y"')
ans =
"Y"
>> version
ans =
'9.7.0.1319299 (R2019b) Update 5'
>> str2num('"Y"')
ans =
[]

その他の回答 (0 件)

カテゴリ

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

タグ

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by