필터 지우기
필터 지우기

i sampled a 50Hz signal at 800Hz and i want to use FFt to extract the magnitude of the fundamental frequency (50Hz). how do i go about it? Please can anyone be of help. Thank you

조회 수: 3 (최근 30일)
i sampled a 50Hz signal at 800Hz and i want to use FFt to extract the magnitude of the fundamental frequency (50Hz). how do i go about it? Please can anyone be of help. Thank you

답변 (1개)

Star Strider
Star Strider 2017년 6월 26일
See the documentation on fft (link). Specifically note the code between the first (top) two plot figures.
  댓글 수: 2
Star Strider
Star Strider 2017년 6월 26일
This is essentially the code I referred to:
D = Your_Signal;
Fs = 800; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
L = length(D);
FTD = fft(D)/L;
Fv = linspace(0, 1, fix(L/2)+1)*Fn; % Frequency Vector (Hz)
Iv = 1:length(Fv); % Index Vector
figure(1)
plot(Fv, abs(FTD(Iv))*2)
grid

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

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by