ch78sol - 7-9. / continued %PR7-9-1. m f=-5:.01:5; W...

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

View Full Document Right Arrow Icon
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

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

View Full DocumentRight Arrow Icon
7-9. / continued %PR7-9-1. m f=-5:.01:5; W l=(sinc(f))."2; W2=sinc(2*f)+.5*sinc(2*f+ones(size(f))+,5*~inc(2*f-ones(size(f)); W3=1.08 *sinc(2*f)+.46'sinc(2*f+ones(size(f))+,46*sinc(2*f-ones(size(f)); clg axis([-5,5,l e-5,101); whitebg subplot(l,3,1);sernilogy(f,abs(W l),'k');yIabel('/W(f,~') title('Bartlet ') axis([-5,5,le-5, !0]); subplot(l,3,2);semilogy(f,abs(W2),'k'); xlabel('Frequencyl); title('Hanning '); axis([-5,5,1e-5, lo]); subplot(l,3,3);semilogy(f,abs(W3),'k') title('Hamming '); axis([-5,5,l e-5,101); Bartlet Hanninq Hamming Frequency
Background image of page 4
0.25,0.23,-0.91,-0.19,0.24]; fs=100; %Sampling frequency M-8 %Number points in lag window (even) [a, b]=size(x); if a < b % make x a column vector x=x9; N=b; else N=a; end x 1 =detrend(x,O); %remove the dc component x1(2*N-2)=0; %zero pad to length of 2N-2 Rl=real(ifft(abs(fFt(x1))."2)); %raw autocorrelation %compute weighted autocorrelation W-triang(2 *N- 1); R2=[Rl (rJ:2*N-2);RI (1 :N-I)]./((N)*W(1:2*N-2)); R3=R2(N-M:N+M- 1); H=hamming(2*M+ 1); R4=R3 .*H(1:2*M); I~2~(ceil(log2(2*MJ) +2); %make length FFT power of 2 and add zeros S 1 =abs((l/fs)*fR(R4,k)); f=O:fS/k:fdZ; Scor=S l(1: W2+ 1); %positive frequency part of spectral density sernilogy(f, Scor);
Background image of page 5

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

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

This note was uploaded on 06/16/2010 for the course EE e3180 taught by Professor Burl during the Spring '08 term at Michigan Technological University.

Page1 / 16

ch78sol - 7-9. / continued %PR7-9-1. m f=-5:.01:5; W...

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

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