Incorrect behavior of str2num?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
This seems not to work as intended:
>> str2num('"Y"')
ans =
"Y"
This should return an empty array.
5 个评论
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?
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!