(New page: == Part B == Original Code: <pre> F0 = 13; T0 = 1/F0; Ts = .07; t = 0:Ts:13*T0; x = real(exp(j*(2*pi*F0*t-pi/2))); plot(t,x)</pre> Updated Code: <pre> F0 = 13; T0 = 1/F0; Ts = .07/1000...)
 
(Part B)
 
Line 20: Line 20:
 
x = real(exp(j*(2*pi*F0*t-pi/2)));
 
x = real(exp(j*(2*pi*F0*t-pi/2)));
 
plot(t,x)</pre>
 
plot(t,x)</pre>
 +
 +
The bug was Ts, which was not in small enough increments, there fore there wasn't enough points on the graph.  So, I divded Ts by 1000 to give the graph many more plotting points.

Latest revision as of 11:56, 10 September 2008

Part B

Original Code:

F0 = 13;
T0 = 1/F0;
Ts = .07;
t = 0:Ts:13*T0;
x = real(exp(j*(2*pi*F0*t-pi/2)));
plot(t,x)

Updated Code:

F0 = 13;
T0 = 1/F0;
Ts = .07/1000;
t = 0:Ts:13*T0;
x = real(exp(j*(2*pi*F0*t-pi/2)));
plot(t,x)

The bug was Ts, which was not in small enough increments, there fore there wasn't enough points on the graph. So, I divded Ts by 1000 to give the graph many more plotting points.

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang