How can I evaluate this Fourier-transform?

4 vues (au cours des 30 derniers jours)
Andreas Pedersen
Andreas Pedersen le 10 Mar 2018
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?

Réponses (2)

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

Torsten
Torsten le 12 Mar 2018
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.

Catégories

En savoir plus sur Error Functions dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by