Revision as of 17:38, 12 September 2008 by Verman (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Part B: Find the Bug


Bugged matlab 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)


--------------------------------------------------------------------------------------------------------------
To=1/13=0.076 and Ts=0.07 . Sampling rate seems to be too close to the period and based on the figure we conclude that the sampling rate is too small. One must decrease the sampling time to increase the sampling rate.



Correct matlab code :

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

Alumni Liaison

Followed her dream after having raised her family.

Ruth Enoch, PhD Mathematics