Help with exponential Fourier series coefficients.

Problem:
Compute the exponential Fourier series coefficients numerically using MATLAB following the Computer Example. Modify the code for the signal for the figure below and plot the amplitude and phase spectra for this signal.
Here's the link to the figure http://imageshack.us/photo/my-images/705/phpayxvv9.png/
sample code to be modified:
----------------------
parameters:
T_0 = ??;
N_0 = 256;
T = T_0/N_0;
t = 0:T:T*(N0-1);
M = 10;
x(t) = ??
*to compute exponential fourier series
D_n = fft(x)/N_0;
n = [-N_0/2:N_0/2-1];
clf; subplot(2,2,1); stem(n,abs(fftshift(D_n)),'k');
axis([-M M -.1 .6]); xlabel('n'); ylabel('|D_n|');
subplot(2,2,2); stem(n,angle(fftshift(D_n)),'k');
axis([-M M -pi pi]); xlabel('n'); ylabel('\angle D_n [rad]');
This is what I have so far and I don't know what to do next.

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Asked:

Tom
on 4 Oct 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!