1. Not finding help here? Sign up for a free 30min 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!

How to plot out a triangular wave in matlab

  1. Nov 27, 2013 #1
    that's my programe :
    n=0;
    T=2;
    Ts=T/200;
    t=-T/2:Ts:T/2;

    for n=0:0.1:8;
    V= 0;
    V=V+8/pi^2*(-1)^n*sin(pi*(2*n+1)*t)/(2*n+1)^2;
    pause
    drawnow
    plot(t,V);

    end

    When T=2, write a Matlab program to visualize the Fourier series (with animation) and investigate the largest error you may have when the number of terms is k (=the highest digit of your student ID number). For example, if you student number is M0001234572, then k=7. In this case, your sum
    should run from n=0 to 8.
    i need someone to check for me thanks
     
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?



Similar Discussions: How to plot out a triangular wave in matlab
  1. MATLAB Plotting DTFT (Replies: 0)

Loading...