필터 지우기
필터 지우기

what is the Code for FFT???

조회 수: 1 (최근 30일)
vahid torabi
vahid torabi 2015년 1월 5일
답변: Star Strider 2015년 1월 5일
I have a saved signal in workspace .mat data. I have attached the pic.
plz left me the code of FFT. thank you so much.
How can I gain its FFT???

채택된 답변

Star Strider
Star Strider 2015년 1월 5일
You don’t provide much to work with, but assuming you want to take the fft of ‘y’ that corresponds to uniform sampling times in ‘t’:
Ts = t(2)-t(1); % Sampling Interval
Fs = 1/Ts; % Sampling Frequency
Fn = Fs/2; % Nyquist Frequency
Ly = length(y);
yfft = fft(y)/Ly;
Fv = linspace(0, 1, fix(Ly/2)+1)*Fn; % Frequency Vector
Iv = 1:length(Fv); % Index Vector
figure(1)
plot(Fv, abs(yfft(Iv)))
grid

추가 답변 (0개)

카테고리

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