Results 1 to 4 of 4

Math Help - text string problam

  1. #1
    Newbie
    Joined
    Jun 2009
    Posts
    4

    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
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by winterelf View Post
    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
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jun 2009
    Posts
    4
    it didn't work, it gives me the "(" in the exp but all the others looks like multiply
    Last edited by winterelf; June 30th 2009 at 10:15 AM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by winterelf View Post
    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)
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Integral problam
    Posted in the Calculus Forum
    Replies: 2
    Last Post: December 12th 2009, 11:05 PM
  2. Text alignment.
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: December 7th 2009, 12:29 AM
  3. problam about p(x)=p(y)|J|
    Posted in the Advanced Statistics Forum
    Replies: 0
    Last Post: July 29th 2009, 05:03 AM
  4. String
    Posted in the Algebra Forum
    Replies: 4
    Last Post: March 23rd 2009, 05:04 PM
  5. Under text
    Posted in the LaTeX Help Forum
    Replies: 3
    Last Post: June 11th 2008, 11:02 PM

Search Tags


/mathhelpforum @mathhelpforum