資源簡介
分數傅里葉變換 matlab仿真程序 時頻分析時候用到基礎工具
代碼片段和文件信息
%?The?fast?Fractional?Fourier?Transform???
%?input:?f?=?samples?of?the?signal???
%????????a?=?fractional?power???
%?output:?Faf?=?fast?Fractional?Fourier?transform???
function??Faf=frft(fa)
error(nargchk(2?2?nargin));???
f?=?f(:);???
N?=?length(f);???
shft?=?rem((0:N-1)+fix(N/2)N)+1;???
sN?=?sqrt(N);???
a?=?mod(a4);???
%?do?special?cases???
if?(a==0)?Faf?=?f;?return;?end;???
if?(a==2)?Faf?=?flipud(f);?return;?end;???
if?(a==1)?Faf(shft1)?=?fft(f(shft))/sN;?return;?end????
if?(a==3)?Faf(shft1)?=?ifft(f(shft))*sN;?return;?end???
%?reduce?to?interval?0.5?if?(a>2.0)?a?=?a-2;?f?=?flipud(f);?end???
if?(a>1.5)?a?=?a-1;?f(shft1)?=?fft(f(shft))/sN;?end???
if?(a<0.5)?a?=?a+1;?f(shft1)?=?ifft(f(shft))*sN;?end???
%?the?general?case?for?0.5?
評論
共有 條評論