Should I use the absolute value of fast Fourier transform or the conjugate in signal analysis?

조회 수: 67 (최근 30일)
I found this example in MATLAB https://www.mathworks.com/help/matlab/math/fft-for-spectral-analysis.html and I saw that they used the value of conjugate.
Pyy = Y.*conj(Y)/251;
I tried to calculate the magnitude using abs function rather than this line. I get nearly the same output.
Therefore, I am puzzled; should I use the way in this example or the magnitude way?

채택된 답변

Star Strider
Star Strider 2020년 11월 18일
Note that the plot is ‘Power Spectral Density’. Power is the square of magnitude.
The abs value is the square root of the complex value times its conjugate.
  댓글 수: 2
Muhamed Sewidan
Muhamed Sewidan 2020년 11월 23일
Thank you.
One more question, the example used a second input argument in fft function, which is the number of the time points. Is it necessary to define the number of points inside the Fourier function?
Star Strider
Star Strider 2020년 11월 23일
As always, my pleasure!
The second argument is not necessary. The fft function will use the row length of the argument to determine the row length of the output. The second argument is only necessary if you want to zero-pad the inplut in order to increase the frequency resolution of the output.

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

추가 답변 (1개)

Bruno Luong
Bruno Luong 2020년 11월 18일
Y.*conj(Y) is abs(Y)^2

카테고리

Help CenterFile Exchange에서 Discrete Fourier and Cosine Transforms에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by