Borrar filtros
Borrar filtros

FFT inside a specific interval

2 visualizaciones (últimos 30 días)
MartinM
MartinM el 17 de Sept. de 2021
Comentada: William Rose el 17 de Sept. de 2021
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 comentario
William Rose
William Rose el 17 de Sept. de 2021
@MartinM, YOur code does not run because Trep is not defined.

Iniciar sesión para comentar.

Respuestas (1)

MartinM
MartinM el 17 de Sept. de 2021
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?

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by