(New page: ==Desired Code== <pre> F0=13; T0=1/F0; BigT=0.007; t=0:BigT:13*T0; x=real(exp(j*(2*pi*F0*t-pi/2))); plot(t,x) grid on </pre>) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | == | + | ==Given Code== |
<pre> | <pre> | ||
F0=13; | F0=13; | ||
T0=1/F0; | T0=1/F0; | ||
− | + | Ts=0.07; | |
− | t=0: | + | t=0:Ts:13*T0; |
+ | x=real(exp(j*(2*pi*F0*t-pi/2))); | ||
+ | plot(t,x) | ||
+ | grid on | ||
+ | </pre> | ||
+ | Too large Step(Ts) | ||
+ | |||
+ | ==Correct code== | ||
+ | <pre> | ||
+ | F0=13; | ||
+ | T0=1/F0; | ||
+ | Ts=0.0007; | ||
+ | t=0:Ts:13*T0; | ||
x=real(exp(j*(2*pi*F0*t-pi/2))); | x=real(exp(j*(2*pi*F0*t-pi/2))); | ||
plot(t,x) | plot(t,x) | ||
grid on | grid on | ||
</pre> | </pre> |
Latest revision as of 14:25, 12 September 2008
Given Code
F0=13; T0=1/F0; Ts=0.07; t=0:Ts:13*T0; x=real(exp(j*(2*pi*F0*t-pi/2))); plot(t,x) grid on
Too large Step(Ts)
Correct code
F0=13; T0=1/F0; Ts=0.0007; t=0:Ts:13*T0; x=real(exp(j*(2*pi*F0*t-pi/2))); plot(t,x) grid on