Filter löschen
Filter löschen

what is the Code for FFT???

1 Ansicht (letzte 30 Tage)
vahid torabi
vahid torabi am 5 Jan. 2015
Beantwortet: Star Strider am 5 Jan. 2015
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???

Akzeptierte Antwort

Star Strider
Star Strider am 5 Jan. 2015
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

Weitere Antworten (0)

Kategorien

Mehr zu Fourier Analysis and Filtering finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by