x='1'
y='2'
disp(x+y)
why is the answer 99

2 comentarios

Matt J
Matt J el 25 de Feb. de 2021
Did you run the code? If so, you should be able to tell us what the answer is.
mariam moutaz
mariam moutaz el 25 de Feb. de 2021
the answer is 99

Iniciar sesión para comentar.

 Respuesta aceptada

David Hill
David Hill el 25 de Feb. de 2021

0 votos

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

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 25 de Feb. de 2021

Editada:

el 25 de Feb. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by