Results 1 to 8 of 8

Math Help - plot of a function of time a matlab question

  1. #1
    Newbie
    Joined
    Dec 2011
    Posts
    13

    Question plot of a function of time a matlab question

    I have a question in the MATLAB
    [IMG] Uploaded with ImageShack.us[/IMG]
    could you please help me ?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: plot of a function of time a matlab question

    Quote Originally Posted by nezar View Post
    I have a question in the MATLAB

    could you please help me ?
    Code:
     
    --> t=linspace(0,2,1000);
    --> ii=3.*(1-e.^(-4.*t./1.3));
    --> jj=3.*e.^(-4.*t./1.3).*(exp(0.5*4/1.3)-1);
    --> kk=ii+(t>0.5).*(jj-ii);
    --> plot(t,kk);
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Dec 2011
    Posts
    13

    Re: plot of a function of time a matlab question

    i don't no why he always give me error
    Error in ==> nezar at 2
    ii=3.*(1-e.^(-4.*t./1.3));
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: plot of a function of time a matlab question

    Quote Originally Posted by nezar View Post
    i don't no why he always give me error
    Error in ==> nezar at 2
    ii=3.*(1-e.^(-4.*t./1.3));
    Try replacing e.^ by exp
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Dec 2011
    Posts
    13

    Re: plot of a function of time a matlab question

    same thing give me error
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4

    Re: plot of a function of time a matlab question

    Quote Originally Posted by nezar View Post
    same thing give me error


    Can you post all the relevant code?

    CB
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Newbie
    Joined
    Dec 2011
    Posts
    13

    Re: plot of a function of time a matlab question

    i open m-file and paste
    t=linspace(0,2,1000);
    ii=3.*(1-e.^(-4.*t./1.3));
    jj=3.*e.^(-4.*t./1.3).*(exp(0.5*4/1.3)-1);
    kk=ii+(t>0.5).*(jj-ii);
    plot(t,kk);
    and save the file by name and in command page enter nezar he give me
    >> nezar
    ??? Undefined function or variable 'e'.

    Error in ==> nezar at 2
    ii=3.*(1-e.^(-4.*t./1.3));
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Dec 2011
    Posts
    13

    Re: plot of a function of time a matlab question

    Quote Originally Posted by nezar View Post
    i open m-file and paste
    t=linspace(0,2,1000);
    ii=3.*(1-e.^(-4.*t./1.3));
    jj=3.*e.^(-4.*t./1.3).*(exp(0.5*4/1.3)-1);
    kk=ii+(t>0.5).*(jj-ii);
    plot(t,kk);
    and save the file by name and in command page enter nezar he give me
    >> nezar
    ??? Undefined function or variable 'e'.

    Error in ==> nezar at 2
    ii=3.*(1-e.^(-4.*t./1.3));
    yes finally i get the answer maybe i misunderstand
    thank you you really nice man
    Last edited by nezar; December 13th 2011 at 02:41 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. 3D plot of z = (Matlab)
    Posted in the Math Software Forum
    Replies: 4
    Last Post: July 14th 2011, 09:22 PM
  2. matlab plot function
    Posted in the Math Software Forum
    Replies: 4
    Last Post: May 26th 2010, 08:03 AM
  3. plot multivariable function - stupid question?
    Posted in the Calculus Forum
    Replies: 6
    Last Post: February 10th 2010, 04:45 PM
  4. MatLab Plot
    Posted in the Math Software Forum
    Replies: 1
    Last Post: August 2nd 2008, 11:59 AM
  5. plot of a function of time
    Posted in the Calculus Forum
    Replies: 2
    Last Post: February 26th 2007, 10:10 AM

Search Tags


/mathhelpforum @mathhelpforum