필터 지우기
필터 지우기

FFT inside a specific interval

조회 수: 2 (최근 30일)
MartinM
MartinM 2021년 9월 17일
댓글: William Rose 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
William Rose
William Rose 2021년 9월 17일
@MartinM, YOur code does not run because Trep is not defined.

댓글을 달려면 로그인하십시오.

답변 (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