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: 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

    HallsofIvy

    User Avatar
    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
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook