Revision as of 15:26, 9 September 2008 by Jmazzei (Talk)

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

Error

The error in the code is that the sampling frequency Ts is too high. In the original code it only sampled enough to create two period.

Results

Here is what the graph looks like with the code corrected:

Fixed Graph ECE301Fall2008mboutin.jpg

Code

Here is the code corrected:

F0 =13;

T0 =1/F0;

Ts = 0.005; %This is where the error was. The lower the sampling frequency the clearer the graph.

t  = 0:Ts:13*T0;

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

plot(t,x)

Alumni Liaison

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

Buyue Zhang