This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: w0 = pi; % fundamental frequency T0 = 2*pi/w0; % fundamental period % calculate positive coefficients M = 15; % number of terms ind = 1; for mm = M:M if mm ~= 0 X(ind) = (exp(j*mm*pi)/2); % coefficients X(ind) = X(ind)*((1/(mm*pi)^2)(1/(j*mm*pi))); X(ind) = X(ind)1/(2*(mm*pi)^2); elseif mm == 0 X(ind) = 0.25; end ind = ind + 1; end % create signal t = linspace(2*T0,2*T0,600); % time vector x = zeros(size(t)); ind = 1; for mm = M:M x = x + X(ind)*exp(j*mm*w0*t); ind = ind + 1; end figure(1) plot(t,x,'k'); xlabel('time') title('Problem 7.3.7') Figure P7.3.7...
View
Full Document
 Fall '08
 DJStilwell
 Fourier Series, #, partial sums, 2 $, 2 4 M

Click to edit the document details