1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: How i can plot anti periodic sine wave in matlab ?

  1. Oct 2, 2012 #1
    i don't know how i can use matlab to plot anti periodic fun ..

    the origin site give this code for triangular fun:

    fs = 10000;
    t = -1:1/fs:1;
    x1 = tripuls(t,20e-3);
    plot(t,x1), xlabel('Time (sec)');ylabel('Amplitude'); title('Triangular Aperiodic Pulse')

    but when i use this for sine wave . i have an error (??? Error using ==> sin
    Too many input arguments.)

    so how i can solve this problem ?

    thanx in advance
  2. jcsd
  3. Oct 2, 2012 #2


    User Avatar

    Staff: Mentor

    Can you post the code that you used for the sine wave pulse?
  4. Oct 3, 2012 #3
    the same code but i change tripulse to sin >>

    fs = 10000;
    t = -1:1/fs:1;

    x1 = sin(t,20e-3);
    plot(t,x1), xlabel('Time (sec)');ylabel('Amplitude'); title('sin Aperiodic Pulse')
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook