Fftresolution.docx

  • Uploaded by: Kassaye Gizaw
  • 0
  • 0
  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Fftresolution.docx as PDF for free.

More details

  • Words: 67
  • Pages: 2
%% matlab code x1=sin(2*pi*1*[0:63]/16)'; x2=sin(2*pi*2*[0:63]/16)'; clf y=(x1+x2).*hamming(length(x1+x2)); plot([0:length(y)-1]*16/length(y),log10(abs(fft(y))),'.') hold y=[zeros(length(y)/2,1); y; zeros(length(y)/2,1)]; plot([0:length(y)-1]*16/length(y),log10(abs(fft(y))),'go') y=[zeros(length(y)/2,1); y; zeros(length(y)/2,1)]; plot([0:length(y)-1]*16/length(y),log10(abs(fft(y))),'rx') xlabel('Hz') grid ylabel ('log magnitude') legend({'no pad','zero padded*2','zero padded*4'}) title('1 Hz, 2 Hz components') print -djpeg99 -r300 1_2Hz.jpg x1=sin(2*pi*1.125*[0:63]/16)'; clf y=(x1+x2).*hamming(length(x1+x2)); plot([0:length(y)-1]*16/length(y),log10(abs(fft(y))),'.') hold y=[zeros(length(y)/2,1); y; zeros(length(y)/2,1)]; plot([0:length(y)-1]*16/length(y),log10(abs(fft(y))),'go') y=[zeros(length(y)/2,1); y; zeros(length(y)/2,1)]; plot([0:length(y)-1]*16/length(y),log10(abs(fft(y))),'rx') xlabel(Hz) xlabel('Hz') grid ylabel ('log magnitude') legend({'no pad','zero padded*2','zero padded*4'}) title('1.125 Hz, 2 Hz components') print -djpeg99 -r300 1125_2Hz.jpg

More Documents from "Kassaye Gizaw"

Fftresolution.docx
May 2020 1
Collapse In Us.docx
May 2020 3
Dft.txt
May 2020 8
Pnnl_25643.pdf
December 2019 5
4858431.pdf
November 2019 7