- #1
cambone69
- 1
- 0
Homework Statement
(a) For each function determine the first 10 non zero elements in the Fourier series representation. Use Matlab to compute the coefficients, and graph the result.
Homework Equations
N/A
The Attempt at a Solution
I noted the even symmetry of the function, and thus I do not have to compute the "bn" (sine) coefficients. Also the fact that I can compute the cosine coefficients by integrating over half of the period, ie 0--->T/2. I know how to compute the coefficients by hand, however I am required to use Matlab.
In MatLab how would I define the function f (which appears to be a unit step function on half the period) in MatLab, with which I could multiply by cosine and then integrate appropriately?
This is a simple problem, however Matlab has become the biggest roadblock here.
Any help would be greatly appreciated.
Cam