Borrar filtros
Borrar filtros

Extracting phase information from FFT

2 visualizaciones (últimos 30 días)
Jan
Jan el 4 de Sept. de 2013
Hello, I wanted to know how to get phase information out of an FFT calculation like this:
NFFT = 2^nextpow2(L); % Next power of 2 from length of y
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
plot(f,2*abs(Y(1:NFFT/2+1)))
title('Single-Sided Amplitude Spectrum of y(t)')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
X=abs(Y); %takes away complex value
I understand that X gives me power information. What function or command do I need to use to extract angle information which will give me phase? Something like
angle(fft(8)) %if I want to extract phase information about freq 8Hz.
Thanks in advance for your help!

Respuestas (1)

dpb
dpb el 4 de Sept. de 2013
doc angle doc unwrap % Signal Processing Toolbox

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by