Unformatted text preview: for k = 1:nterm cwt = cos(k*omega*tcycle(i)); swt = sin(k*omega*tcycle(i)); af(i) = Y*mod(tcycle(i),tau)/tau; ef(i) = ef(i) + a(k)*cwt + b(k)*swt; end end e subplot(2,1,1) plot(tcycle,af,'') axis([0 5*tau 0.02 0.12]) xlabel('t') ylabel('periodic function') subplot(2,1,2) plot(tcycle,ef) axis([0 5*tau 0.02 0.12]) xlabel('t') ylabel('Fourior series approximation') title('Comparison between af and ef')...
View
Full Document
 Spring '08
 WU

Click to edit the document details