Results 1 to 2 of 2

Math Help - MatLab Plot

  1. #1
    Newbie
    Joined
    Aug 2008
    Posts
    1

    MatLab Plot

    Hi

    I've been trying to creat a plot of two graph but when I'm
    executing them both it's preforming only one of them, so I tryed to execute them separately and it worked.

    here is the code:

    R = 4;%Ω
    L = 1.3;%H
    V = 12;%Volt

    t1 = linspace(0,0.5,8);
    t2 = linspace(0.5,2,8);

    ft1 = (V/R).*(1 - exp((-R.*t1)./L));%for 0<=t<=0.5
    ft2 = (exp((-R.*t2)./L).*(V/R).*(exp((0.5*R)/L) - 1));%for t>=0.5


    plot(ft1,ft2);

    I will appreciate any help

    thanks

    Daniel
    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 daniel_still View Post
    Hi


    I've been trying to creat a plot of two graph but when I'm executing them both it's preforming only one of them, so I tryed to execute them separately and it worked.


    here is the code:

    R = 4;%Ω
    L = 1.3;%H
    V = 12;%Volt

    t1 = linspace(0,0.5,8);
    t2 = linspace(0.5,2,8);

    ft1 = (V/R).*(1 - exp((-R.*t1)./L));%for 0<=t<=0.5
    ft2 = (exp((-R.*t2)./L).*(V/R).*(exp((0.5*R)/L) - 1));%for t>=0.5


    plot(ft1,ft2);

    I will appreciate any help

    thanks

    Daniel
    Try this instead of the plot command

    plot(t1,ft1,t2,ft2);

    RonL
    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. Kac Formula plot with MatLab
    Posted in the Math Software Forum
    Replies: 1
    Last Post: March 14th 2010, 08:33 AM
  4. help me to plot this equation in Matlab....
    Posted in the Math Software Forum
    Replies: 1
    Last Post: April 23rd 2009, 10:38 PM
  5. [Matlab] 2D Sequence Plot in 3D
    Posted in the Math Software Forum
    Replies: 2
    Last Post: April 23rd 2009, 05:28 AM

Search Tags


/mathhelpforum @mathhelpforum