フィルターのクリア

Graph Simple Pulse function in matlab HELPPPPPPPPPPPPP PLEASE

1 回表示 (過去 30 日間)
Chance
Chance 2012 年 3 月 12 日
Consider a pulse function of time duration 0 to T which is half of a sine wave:
x(t) = 0 t < 0
x(t) = Asin(pi*t/T) 0 < t < T
x(t) = 0 t > T
Calculate the Fourier transform of this pulse. For A=1 and T=1 (sec) plot the magnitude of X(f) versus f.
*I just need the matlab code. Thank you****
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 3 月 12 日
Just the MATLAB code? You mean we can skip the comments and the descriptions of what we are doing and you promise not to ask questions about how it works?
Oleg Komarov
Oleg Komarov 2012 年 3 月 12 日
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer

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

採用された回答

Walter Roberson
Walter Roberson 2012 年 3 月 12 日
Just the MATLAB code.
f = linspace(-50,50,301);
t1 = pi .^ 2;
t4 = -pi - (2 .* f);
t5 = exp((-1*i) .* t4);
t12 = exp((i) .* (f + pi ./ 0.2e1));
t17 = sqrt((0.2e1 .* t1) + t1 ./ t12 .* ((i) + (-1*i) .* t5));
t18 = f .^ 2;
t20 = abs(-0.2e1 .* t1 + (2 .* t18));
t23 = 2 ./ t20 .* t17;
plot(f, t23);
  2 件のコメント
Jan
Jan 2012 年 3 月 12 日
Perhaps the OP does not ask for details. I promise, I will not ask, too.
Btw, the code works well, if you rename all "t4" to "t2".
Walter Roberson
Walter Roberson 2012 年 3 月 12 日
The calculation was a bit on the Heavy Side.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by