BME513_HW_2

BME513_HW_2 - BME 513 HW#2 Group 21: Su, Zhe; Valu,...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
BME 513 HW#2 Group 21: Su, Zhe; Valu, Kaushal; Zhang, Xiabing; 2. For 6.1_1a and 6.1_2, plot the Fourier series approximation using the first 5, 10 and 15 harmonics in MATLAB. -8 -6 -4 -2 0 2 4 6 8 -1.5 -1 -0.5 0 0.5 1 1.5 Fourier series approximation using first 5 harmonics -8 -6 -4 -2 0 2 4 6 8 -1.5 -1 -0.5 0 0.5 1 1.5 Fourier series approximation using first 10 harmonics
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
BME 513 HW#2 Group 21: Su, Zhe; Valu, Kaushal; Zhang, Xiabing; Matlab code: N_harmonics = 5; %number of harmonics t = -9:.001:9; %set time interval and sampling x = zeros(size(t)); %initialize approximation %perform loop summation for k=1:N_harmonics x = x+(4/pi)*[((-1)^(k-1))/(2*k-1)]*cos((2*k-1)*0.5*pi*t); end figure; plot(t,x); axis([-9 9 -1.5 1.5]); title( 'Fourier series approximation using first 5 harmonics' ); -8 -6 -4 -2 0 2 4 6 8 -1.5 -1 -0.5 0 0.5 1 1.5 Fourier series approximation using first 15 harmonics
Background image of page 2
-3pi -2pi -pi 0 pi 2pi 3pi 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Fourier series approximation using first 5 harmonics
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

BME513_HW_2 - BME 513 HW#2 Group 21: Su, Zhe; Valu,...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online