필터 지우기
필터 지우기

Difference between fft and pspectrum

조회 수: 65 (최근 30일)
Takashi Fukushima
Takashi Fukushima 2020년 9월 22일
댓글: Takashi Fukushima 2020년 9월 22일
I would like to do frequency analysis of EMG and found 2 different functions: fft and pspectrum. Could anyone tell me the difference between the 2 functions?

채택된 답변

Shantanu Dwivedi
Shantanu Dwivedi 2020년 9월 22일
편집: Shantanu Dwivedi 2020년 9월 22일
The 'fft(x)' function computes the discrete Fourier transform (DFT) of x using a fast Fourier transform (FFT) algorithm.
Please refer the following link for more information about the fft function.
The 'pspectrum(x)' function returns the power spectrum of x.
Please refer the following link for more information about the 'pspectrum' function.
A fast Fourier transform is an algorithm that computes the discrete Fourier transform of a sequence. Fourier Transform changes the domain of the signal from time or space to frequency domain. The DFT is obtained by decomposing a sequence of values into components of different frequencies.
The statistical average of a certain signal or sort of signal (including noise) as analyzed in terms of its frequency content, is called its spectrum. So, the power spectrum refers to the spectral energy distribution that would be found per unit time, since the total energy of such a signal over all time would generally be infinite.
  댓글 수: 1
Takashi Fukushima
Takashi Fukushima 2020년 9월 22일
Thank you very much for your answer.
I visited fft function page and saw this ...
Y = fft(X);
Fs = Sample frequency
L = Length of signal
P2 = abs(Y/L);
P1 = P2(1:L/2+1);
P1(2:end-1) = 2*P1(2:end-1);
f = Fs*(0:(L/2))/L;
plot(f,P1);
Could you tell me why I have to compute two-sided spectrum and convert it to single-sided spectrum? I mean I do not know where the formula comes from...

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

추가 답변 (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