(New page: The original code below uses Ts of 0.07, or a '''sampling rate''' of 0.7 seconds. Therefore, the plot appears to only show one cycle of the sinusoid. <pre>F0 =13; T0 =1/F0; Ts = 0.07; t ...)
 
 
Line 1: Line 1:
The original code below uses Ts of 0.07, or a '''sampling rate''' of 0.7 seconds. Therefore, the plot appears to only show one cycle of the sinusoid.
+
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.
  
 
<pre>F0 =13;
 
<pre>F0 =13;

Latest revision as of 14:05, 12 September 2008

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

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood