Azzera filtri
Azzera filtri

what does x='1' mean

1 visualizzazione (ultimi 30 giorni)
mariam moutaz
mariam moutaz il 25 Feb 2021
Modificato: mariam moutaz il 25 Feb 2021
x='1'
y='2'
disp(x+y)
why is the answer 99
  2 Commenti
Matt J
Matt J il 25 Feb 2021
Did you run the code? If so, you should be able to tell us what the answer is.
mariam moutaz
mariam moutaz il 25 Feb 2021
the answer is 99

Accedi per commentare.

Risposta accettata

David Hill
David Hill il 25 Feb 2021
The + converts the characters into their double equivalent so they can be added.
double('1')+double('2');% = 99

Più risposte (0)

Categorie

Scopri di più su MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by