Behaviour change of `isequal`
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
tommsch
am 1 Mär. 2024
Bearbeitet: cui,xingxing
am 27 Apr. 2024
My question is about the call: isequal( 'a', "a" )
I noted that in Matlab R2018 this returns 0, whereas in Matlab R2020a this returns 1. In which release did this behaviour change?
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 1 Mär. 2024
In R2018b, it returns TRUE already. See the "Compare Character Vector to String Scalar" section
5 Kommentare
Fangjun Jiang
am 1 Mär. 2024
Okay, then the change happened in R2018b. There is a release note about string Arrays but no specific mention of isequal()
which isequal('a','a')
which isequal("a","a")
which isequal('a',"a")
which isequal("a",'a')
Weitere Antworten (1)
cui,xingxing
am 1 Mär. 2024
Bearbeitet: cui,xingxing
am 27 Apr. 2024
Hi,@tommsch
As far as I understand, in both R2018b and R2020a version results return logic 1, not different as you said.
- R2018b
- R2020a
Note:
For Inputs to be compared (as separate arguments) A,B, the documentation has the following description(R2018 and R2020 are both identical):
String scalars and character vectors containing the same sequence of characters are equivalent.
-------------------
Latest R2023b
isequal('ab',"ab")
-------------------------Off-topic interlude, 2024-------------------------------
I am currently looking for a job in the field of CV algorithm development, based in Shenzhen, Guangdong, China,or a remote support position. I would be very grateful if anyone is willing to offer me a job or make a recommendation. My preliminary resume can be found at: https://cuixing158.github.io/about/ . Thank you!
Email: cuixingxing150@gmail.com
0 Kommentare
Siehe auch
Kategorien
Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!