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!