(New page: == Find the Bug == The original 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) The fixed code: F0 = 13; T0 = 1/F0; Ts = 0.0005...) |
(No difference)
|
Latest revision as of 15:31, 12 September 2008
Find the Bug
The original 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)
The fixed code:
F0 = 13;
T0 = 1/F0;
Ts = 0.0005;
t = 0:Ts:13*T0;
x = real(exp(j*(2*pi*F0*t-pi/2)));
plot(t,x)
The Bug in the problem is the rate of sampling is much too big and needs to be made smaller in order to show the right thing