how can i get the fractional fourier transform of hamming window function
Show older comments
if true
% code
function frft2=frft(f,a)
N=length(f);
%---------interpolation at the begining-------------
f=interpft(f,2*N);
xaxis=(-N/2:N/2-1);
%...............variables for chirp.....................
alpha = a*pi/2;
talpha2 = tan(alpha/2);
sinalpha=sin(alpha);
%..................defining chirp.......................
chirp = exp(-i/N*pi/4*talpha2*(-N:N-1)'.^2);
%...............multiplying with chirp..................
for p=1:2*N-1
f(p)= f(p)*chirp(p);
end
%................convoluting with chirp.................
c = pi/N/sinalpha/4;
chirp2=exp(i*c*(-(2*N):2*N-1)'.^2);
Frft = conv(chirp2,f);
%............post multiplying with chirp................
Frft = chirp.*Frft(2*N:4*N-1);
%............multipling by the gain term...............
Frft = Frft(1:2*N)*exp(-i*pi*sign(sinalpha)/4
+i*alpha/2)/sqrt(abs(sinalpha))/2/sqrt(N);
%..........down sampling Frft to N terms..............
17
% length(frft)
frft2=Frft(1:2:2*N);
end
1 Comment
PRACHI TIWARI
on 18 May 2015
i also want to do coding of different window function with FRFT.
Answers (0)
Categories
Find more on Fast Fourier Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!