?? linear_fft.m
字號:
% File: linear_fft.m
function [fftx,freq] = linear_fft(x,n,ts)
% This function takes n (must be even) time domain samples (real or
% complex) and finds the PSD by taking (fft/n)^2. The two sided
% spectrum is produced by shifting the PSD. The array freq provides
% the appropriate frequency values for plotting purposes.
y = zeros(1,n);
for k=1:n
freq(k) =(k-1-(n/2))/(n*ts);
y(k) = x(k)*((-1.0)^(k+1));
end;
fftx = fft(y)/n;
% End of function file.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -