FFT inside a specific interval

7 次查看(过去 30 天)
MartinM
MartinM 2021-9-17
Hello
I have a frequency and temporal domain.
And a vector linked to frequency domain.
I would like to FFt this vector but inside a specific frequency interval. And I don't know how to reconstruct the temporal vector...
FWHM=140e-15/1.76;
Tduration=FWHM./(2.*log(1+sqrt(2)))
phy.Tcav =1/Trep;
num.n=1*2^17;
num.tspan =10000*FWHM*1.76
num.dt=num.tspan/(num.n-1);
T = zeros(1, num.n);
for k=1:1:num.n
T(k)=(k-1)*num.dt-num.tspan/2;
end
DeltaT=T(2)-T(1);
fmax=1./(DeltaT);
fmin=1./(T(num.n)-T(1));
num.fspan=(fmax-fmin);
F=linspace(-num.fspan/2,num.fspan/2-num.fspan/num.n,num.n);
num.f=fftshift(F);
wabs=2.*pi.*fftshift(num.f);
A=0.1.*sin(10e-12.*(wabs))
Lim=1500:3500
A2=0.1.*sin(10e-12.*(wabs(Lim)))
plot(wabs(Lim),A2)
figure
plot(T(Lim),abs(fftshift(fft(A2))))
I know that i need to recreat T, from wabs(ini) and wabs(final) but can't found the tricks
If someone has an idea
Regards

回答(1 个)

MartinM
MartinM 2021-9-17
FF=F+phy.fo;
df=FF(1500)-FF(1499);
dt=1/df/length(Lim);
t=dt*linspace(-(length(Lim)-1)/2,length(Lim)/2,length(Lim))
plot(t,abs(fftshift(fft(A2))))
Not perfect,
but looks ok
Is it better if length(Lim) is a nextpow2?

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by