Inverse Fourier Transform Using ifourier command

Hi! I have a quick question on the ifourier command. I am currently trying to take the inverse fourier transform of the following function.
I can get the following answer but I am having trouble with plotting.
ifourier gives me -> -(2*pi*t*sign(t) + 2*fourier(cos(w)/w^2, w, -t))/(2*pi)
I would greatly apprecaite any help on trying to get this to plot. The graph for the original function should look something like this.
Thanks again

 採用された回答

Paul
Paul 2022 年 2 月 20 日

0 投票

Sometimes simplify is needed:
syms w t
X(w) = 4*sin(w/2)^2/w^2;
x(t) = ifourier(X(w),w,t)
x(t) = 
x(t) = simplify(x(t),100)
x(t) = 
fplot(x(t),[-2 2])

3 件のコメント

William Trace Lacour
William Trace Lacour 2022 年 2 月 20 日
When can you tell that you need a simplify? Otherwise that fixed it. Awesome!
William Trace Lacour
William Trace Lacour 2022 年 2 月 20 日
and I guess why is it needed?
Paul
Paul 2022 年 2 月 20 日
Don't know why it was needed. I suppose in this case it might have to do with whatever rules and tansforms the Symbolic Math Toolbox uses for fourier()/ifourier(). Sometimes one just has to try things. simplify() is usually a good place to start. In other cases, rewrite(), expand(), etc. can be helpful.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

2022 年 2 月 20 日

コメント済み:

2022 年 2 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by