# Thread: print text along with variable value

1. ## print text along with variable value

Code:
function one()
x=3;
disp(x)

end
in the above code the output is

3

how can i get it as

value of x is 3

2. Something like this:

Code:
EDU>> x = 3;
EDU>> fprintf('value of x is %i\n',x)
value of x is 3
EDU>>
Elbarto