matlab - Chosing correct frequency axes -


i want have amplitude , phase reconstruction of signal. signal having 40khz bandwidth , starting frequency 70khz 110 khz. suppose signal x.

nfft = length(x); res  = fft(x,nfft)/ nfft;                     % normalizing fft f    = fs/2*linspace(0,1,nfft/2+1);           % choosing correct frequency  res  = res(1:nfft/2+1);                       % amplitude of fft res2 = fft(res); 

i want plot frequency versus amplitude using

figure plot(f,abs(res2)) 

where amplitude should lying 70khz 110khz , frequency versus phase

figure plot(f,angle(res2)) 

the phase should spread on 70khz 110khz. how chose correct frequency axes.

if plot frequency content of signal x , not frequency content of transformed signal res, should rid of line

res2 = fft(res); 

the plot(f,abs(res)) , plot(f,angle(res)) correctly show signal 0 fs/2.

you can zoom more closely on 70khz-110khz frequency range of interest (assuming fs/2>110000) using:

axis([70000 110000]); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -