Bug

The bug was a sampling rate that was too low. Ts = 0.07s while the frequency of the sinusoid was 13Hz. Therefore the period of the sinusoid is 1/13 = 0.077 s. With the sampling rate being roughly the same as the period it is little wonder that most of the signal was not captured.

Modified code

F0 = 13;

T0 = 1/F0;

Ts = 0.001;

t = 0:Ts:13*T0;

x = real(exp(j*(2*pi*F0*t-pi/2)));

plot(t,x)


Wanted waveform

Sinusoid ECE301Fall2008mboutin.jpg

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood