what is the Code for FFT???
1 回表示 (過去 30 日間)
古いコメントを表示
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???
0 件のコメント
採用された回答
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 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!