Graph Simple Pulse function in matlab HELPPPPPPPPPPPPP PLEASE
1 次查看(过去 30 天)
显示 更早的评论
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
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
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
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
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".
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!