(Desired Code)
 
Line 1: Line 1:
==Desired Code==
+
==Given Code==
  
 
<pre>
 
<pre>
Line 11: Line 11:
 
</pre>
 
</pre>
 
Too large Step(Ts)
 
Too large Step(Ts)
 +
 +
==Correct code==
 +
<pre>
 +
F0=13;
 +
T0=1/F0;
 +
Ts=0.0007;
 +
t=0:Ts:13*T0;
 +
x=real(exp(j*(2*pi*F0*t-pi/2)));
 +
plot(t,x)
 +
grid on
 +
</pre>

Latest revision as of 14:25, 12 September 2008

Given 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)
grid on

Too large Step(Ts)

Correct code

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

Alumni Liaison

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood