?? stft.m
字號:
function X_stft = stft(x, sigma, Ts)
%**************************************************************************
% X_stfrft : the short-time fractional Fourier transform
% x : the input sequence
% sigma : the standard deviation of the Gaussian window funcion
% Ts : the time sampling interval
% 2007.11.13 by Li Yanlei
%**************************************************************************
[R,C] = size(x);
if R ~= 1, x = x.'; L = R; else L = C; end % make sure that x is row vector
if mod(L,2) ~= 0, L = L+1; x = [x,0]; end % make sure that L is even
n = -L/2+1 : L/2;
t = Ts*n;
for m = -L/2+1 : L/2
window = (2*pi*sigma^2)^(-0.25)*exp(-(t-(m*Ts)).^2/(4*sigma^2));
X_stft(:,m+L/2) = fftshift(fft(x.*window))/sqrt(L);
end
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -