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!

Fourier Series using MATLAB

  1. Oct 13, 2008 #1
    The problem are as below :-

    f(x) = {
    x, for 0 < x < pi/2;
    x/2, for pi/2 < x < pi;
    pi-(x/2), for pi < x < 2*pi;

    how do I convert it to Matlab code and produce a graph of fourier series with n=500?

    I have done analytically by hand for n=2, but the question ask to produce n=500, can anybody help?
  2. jcsd
  3. Oct 13, 2008 #2


    User Avatar
    Staff Emeritus
    Science Advisor

    I don't see any reason why that can't be integrated, "by hand", for any n. It doesn't look like the general n would be any harder than n= 1 or 2. Are we to assume this is periodic with period pi?
  4. Oct 13, 2008 #3
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Fourier Series using MATLAB