How to extract phase and amplitude information from FFT?

조회 수: 16 (최근 30일)
Mayank Lakhani
Mayank Lakhani 2015년 6월 26일
댓글: Adam 2017년 7월 14일
I am doing signal processing of radar data. I applied butturworth bandpass filter and applied fft to the radar data.I want to know how to extract the phase and amplitude information of radar data so i can add it to my ideal radar simualation and make it non ideal :D . Thanks
load('fb2040'); % loading the data
x = fb2040(3,:);
y_filt = filter(b,a,x); % filtering the received signal
nfft = length(y_filt);
res = fft(y_filt,nfft)/ nfft; % normalizing the fft
f = fs/2*linspace(0,1,nfft/2+1); % choosing correct frequency axes
res = res(1:nfft/2+1);
figure, plot(f,abs(res));
xlabel('Frequency in MHz');ylabel('Amplitude');
return

채택된 답변

Adam
Adam 2015년 6월 26일
If you want the phase and amplitude for different frequencies then these are just:
angle( res );
real( res );
or
abs( res );
if you want the magnitude rather than amplitude.
  댓글 수: 2
Peter Mbamaluikem
Peter Mbamaluikem 2017년 7월 13일
Hi, Adam what if there are several frequencies and one is to extract the magnitude of one say 60Hz. what will the code be?
Adam
Adam 2017년 7월 14일
'res' in the above code is a vector of results corresponding to the frequencies in 'f' in the original code in the question so just find the 'f' that is closest to 60Hz and take the magnitude of that value rather than the whole vector.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spectral Measurements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by