Hi,
This seems not to work as intended:
>> str2num('"Y"')
ans =
"Y"
This should return an empty array.

댓글 수: 5

dpb
dpb 2020년 5월 13일
Can't reproduce that here w/ R2019b. Which release?
Tried clear str2num yet first?
Arjan Lampe
Arjan Lampe 2020년 5월 13일
R2018b
No, I didn't name a variable str2num
goerk
goerk 2020년 5월 13일
I can reproduce the behaviour with R2017b.
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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Calendar에 대해 자세히 알아보기

제품

릴리스

R2018b

태그

질문:

2020년 5월 13일

댓글:

2020년 5월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by