Functions | |
if (nargin< 4) coef | |
endif endif endif | elseif (nargin==5) if(ischar(w_type)) if(strcmp(w_type |
elseif (strcmp(w_type,"hamming")) w_type | |
elseif (strcmp(w_type,"rectangle")) w_type | |
else | error ("stft: unknown window type `%s'", w_type) |
endif endif else | print_usage () |
if (nc!=1) if(nr | |
else | error ("stft: X must be a vector") |
if (win > num_coef) win | |
printf ("stft: window size adjusted to %f\n", win) | |
if (w_type==3) WIN_COEF | |
elseif (w_type==2) WIN_COEF | |
if (nargout==1) Y | |
Variables | |
function [Y, c] | |
endif endif endif hanning | w_type = 1 |
endif [nr, nc] = size (X) | |
nr = nc | |
endif endif | num_coef = 2 * coef |
endif | num_win = fix ((nr - win) / inc) |
else | WIN_COEF = hanning (win) |
endif | Z = zeros (num_coef, num_win + 1) |
start = 1 | |
for | i |
endfor | Y = fft (Z) |
else | c = [win, inc, w_type] |
elseif | ( | w_type | = =2 |
) |
elseif | ( | strcmp(w_type,"rectangle") | ) |
elseif | ( | strcmp(w_type,"hamming") | ) |
else error | ( | "stft: X must be a vector" | ) |
if | ( | nargout | = =1 |
) |
if | ( | w_type | = =3 |
) |
if | ( | nc! | = 1 |
) |
if | ( | ) |
start = 1 |