1. ## text string problam

hi, (again

i gave a little problem writing a text in my plot title
this is the line
title(['x(t)= e^' num2str(S)]);

it gives me e^(number)
where "S" is a number that is changing (it's a variable in a lop)
the thing is that i need to multiply S with t where t is just a char...
i need this " e^(S*t)" where only S will change...
how can i do that...

and another problem...
i use mesh command to create a 3D plot, but it create me a plot with nice colors but without a grid inside the plot itself, just colors... i want to stay with the "mesh" command and to add grid to my plot... how should i do that?

thanks again

2. Originally Posted by winterelf
hi, (again

i gave a little problem writing a text in my plot title
this is the line
title(['x(t)= e^' num2str(S)]);

it gives me e^(number)
where "S" is a number that is changing (it's a variable in a lop)
the thing is that i need to multiply S with t where t is just a char...
i need this " e^(S*t)" where only S will change...
how can i do that...
title( ['e^(', num2str(S) , 't)'] );

CB

3. it didn't work, it gives me the "(" in the exp but all the others looks like multiply

4. Originally Posted by winterelf
it didn't work, it gives me the "(" in the exp but all the others looks like multiply
Then set up a string variable with the title and use that:

Code:
--> S=2.34

S =
2.3400

--> s=['e^(', num2str(S) , 't)']

s =
e^(2.34t)