Reputation: 39
I would like to display in the message dialog box the output of a variable.
msgbox('Your answer is ');
The variable's name is var and it equals 2. How may I edit the code so that I display the value of that variable there (where the blank space is)?
Input would be much appreciated.
Upvotes: 1
Views: 3356
Reputation: 33
this is going to work too
msgbox(['Your answer is= ',num2str(var)]);
Upvotes: 1