What is the difference between 5 and '5'
Afficher commentaires plus anciens
5 + 1 = 6
'5' + 1 = 54
Why does the seceond line equal 54???
What does '' around numbers???
2 commentaires
Star Strider
le 27 Août 2019
To make things even more interesting:
"5" + 1 = "51"
Bruno Luong
le 30 Août 2019
Associativity warning
>> "5"+1+2
ans =
"512"
>> 1+2+"5"
ans =
"35"
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Text Data Preparation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!