what does x='1' mean

1 次查看(过去 30 天)
mariam moutaz
mariam moutaz 2021-2-25
x='1'
y='2'
disp(x+y)
why is the answer 99
  2 个评论
Matt J
Matt J 2021-2-25
Did you run the code? If so, you should be able to tell us what the answer is.
mariam moutaz
mariam moutaz 2021-2-25
the answer is 99

请先登录,再进行评论。

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by