The problem are as below :-(adsbygoogle = window.adsbygoogle || []).push({});

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?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Fourier Series using MATLAB

**Physics Forums | Science Articles, Homework Help, Discussion**