Graph Simple Pulse function in matlab HELPPPPPPPPPPPPP PLEASE
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Walter Roberson
il 12 Mar 2012
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
il 12 Mar 2012
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
Risposta accettata
Walter Roberson
il 12 Mar 2012
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 Commenti
Jan
il 12 Mar 2012
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".
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!