Revision as of 14:05, 12 September 2008 by Dhopper (Talk)

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

The original code below uses Ts of 0.07, or a sampling rate of 0.07 seconds. Therefore, the plot appears to only show one cycle of the sinusoid.

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);

If the sampling rate is changed to 0.001, it will be enough to see all 13 cycles of the sinusoid. Increasing the sampling rate will give a much smoother representation of the sinusoid.

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);

Alumni Liaison

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

Buyue Zhang