# lab1 - ECE425 Lab 1 FALL 2006 Using the FFT to Study...

This preview shows pages 1–3. Sign up to view the full content.

ECE425 FALL 2006 Lab 1 Using the FFT to Study Resampling and Modulation Properties Introduction: In this lab you will learn how to use the FFT to calculate the DTFT and to apply this to a study of resampling and modulation. RESAMPLING BY 4 – AN EXAMPLE PROGRAM Run the following program. It will be useful for you to actually type it in in order for you to be most familiar with the code. % A triangular spectrum and the corresponding signal X=[6 5 4 3 2 1 zeros(1,49) 1 2 3 4 5 ]; x=real(ifft(X)); % Generate the resampling sequence for n=1:60 s(n)=0; for k=0:3 s(n) = s(n) + exp(j*2*pi*(n-1)*k/4); end end s=real(s)/4; % Resample the signal xs=s.*x; XS=real(fft(xs));

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

View Full Document
figure(1) % plot X , the FFT subplot(221) stem([0:59],X) axis([-4 64 -2 8]); % plot to look like DTFT subplot(222) plot([0:1/60:1],[X X(1)]) axis([-.05 1.05 -2 8]); grid %plot XS, the FFT subplot(223) stem([0:59],XS) axis([-4 64 -.5 2]); % plot to look like DTFT subplot(224) plot([0:1/60:1],[XS XS(1)]) axis([-.05 1.05 -.5 2]);
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

lab1 - ECE425 Lab 1 FALL 2006 Using the FFT to Study...

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

View Full Document
Ask a homework question - tutors are online