MATLAB: Trying to display text and variable in a single output line. I was initially trying to use disp then a matrix then fprintf

sentence with variabletext output with varyable

desired output:
The answer is: 800 %
I am trying to display this sentence in a single line of output in the command window. thankyou

Best Answer

name = 'Alice';
age = 12;
X = [name,' will be ',num2str(age),' this year.'];
disp(X)
I FOUND A SAMPLE I WORKED OFF OF
thanyou
Related Question