Can you help me? :(

1 回表示 (過去 30 日間)
Jin You
Jin You 2020 年 5 月 24 日
コメント済み: Ameer Hamza 2020 年 5 月 25 日
I made a unit square pulse and added it to the Fourier.
The integral formula came out well, but the graph is strange.
What's the problem?(I am sorry for my poor English.)
<Code>
clear;
close all;
clc;
syms t w
y=rectangularPulse(t);
f(t)=y*exp(-i*w*t);
F=int(f(t),t,-100,100)
fplot(w,F)
  1 件のコメント
Walter Roberson
Walter Roberson 2020 年 5 月 24 日
fplot(F, [-5,5])

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

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 24 日
編集済み: Ameer Hamza 2020 年 5 月 25 日
This demo shows how to find the fourier and inverse fourier transforms
Fourier transform:
syms t w
y(t) = rectangularPulse(t);
F(w) = int(y(t)*exp(-1i*w*t), t, -0.5, 0.5); % pulse only exist between -0.5 to 0.5
figure;
fplot(F, [-100 100]);
Inverse:
F_inv(t) = int(F(w)*exp(-1i*w*t), w, -100, 100); % integrate frequencies between -100 to 100
t_val = linspace(-2, 2, 1000);
F_val = F_inv(t_val);
figure;
plot(t_val, F_val)
  2 件のコメント
Jin You
Jin You 2020 年 5 月 25 日
thank you so much!!! It's very helpful!!!!
Ameer Hamza
Ameer Hamza 2020 年 5 月 25 日
I am glad to be of help!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by