How can I evaluate this Fourier-transform?

1 次查看(过去 30 天)
I am trying to evaluate the Fourier-transform of a complex function. I have tried using fourier(_):
b=30;
c=1;
syms t;
A=exp(-t.^2/(2*c^2)+i*b*(exp(-t.^2/(2*c^2))).^2)
ft_A=fourier(A)
which just gives me the result:
A =
exp(exp(-t^2)*30i - t^2/2)
ft_A =
fourier(exp(exp(-t^2)*30i - t^2/2), t, w)
Instead, I think i need to go with integral(_) since i suspect that the Fourier transform does not have an analytic solution:
b=30;
c=1;
A=exp(-t.^2/(2*c^2)+i*b*(exp(-t.^2/(2*c^2))).^2)
fun=@(t,w) A.*exp(i*w*t)
q=integral(@(t)fun(t,w),-Inf,Inf)
This dosent work. The resulting error is:
Undefined function or variable 'w'.
Error in ft>@(t)fun(t,w)
Error in integralCalc/iterateScalarValued (line 314)
fx = FUN(t);
Error in integralCalc/vadapt (line 132)
[q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 103)
[q,errbnd] = vadapt(@minusInfToInfInvTransform,interval);
Error in integral (line 88)
Q = integralCalc(fun,a,b,opstruct);
Error in ft (line 5)
q=integral(@(t)fun(t,w),-Inf,Inf)
I guess I need to define w as a vector and then make a new vector where each entry is the integral "q" for a given entry of the w-vector, but how do I do that?

回答(2 个)

Abhishek Ballaney
Abhishek Ballaney 2018-3-12
https://www.mathworks.com/help/matlab/ref/fft.html

Torsten
Torsten 2018-3-12
b=30;
c=1;
fun=@(t,w)exp(-t.^2/(2*c^2)+1I*b*exp(-t.^2/c^2)).*exp(1I*w.*t);
q=@(w)integral(@(t)fun(t,w),-Inf,Inf,'ArrayValued',true);
q(1)
Best wishes
Torsten.

类别

Help CenterFile Exchange 中查找有关 Matrix Computations 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by