What is the difference between 5 and '5'
Ältere Kommentare anzeigen
5 + 1 = 6
'5' + 1 = 54
Why does the seceond line equal 54???
What does '' around numbers???
2 Kommentare
Star Strider
am 27 Aug. 2019
To make things even more interesting:
"5" + 1 = "51"
Bruno Luong
am 30 Aug. 2019
Associativity warning
>> "5"+1+2
ans =
"512"
>> 1+2+"5"
ans =
"35"
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Text Data Preparation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!