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?
0 件のコメント
回答 (2 件)
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Matrix Computations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!