Line 14: Line 14:
  
 
From his reference i decided to use a new timestep of Ts/10000. which turns out to be .07/10000 for my deltaT
 
From his reference i decided to use a new timestep of Ts/10000. which turns out to be .07/10000 for my deltaT
 +
 +
<pre>
 +
F0=13;
 +
T0=1/F0;
 +
Ts=0.07/10000;
 +
t=0:Ts:13:T0;
 +
x=real(exp(j*(2*pi*F0*t-pi/2)));
 +
</pre>

Revision as of 06:47, 12 September 2008

Original Code

F0 =13;
T0 =1/F0;
Ts = 0.07;
t  = 0:Ts:13*T0;
x = real(exp(j*(2*pi*F0*t-pi/2)));

The problem with this code is that since its current frequency is 13 Hz, this causes a problem with the timestep of a Discrete Time signal which shows why there is a bug in this code. The timestep in this case makes the part of the signal that is plotted is considered to small to get a full sample.

In order to fix this code I have referenced Aishwar Sabesan to see values of a new timestep to use to save time (I could have figured it out on my own but I would rather have values in the ballpark before I began)

From his reference i decided to use a new timestep of Ts/10000. which turns out to be .07/10000 for my deltaT

F0=13;
T0=1/F0;
Ts=0.07/10000;
t=0:Ts:13:T0;
x=real(exp(j*(2*pi*F0*t-pi/2)));

Alumni Liaison

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

Buyue Zhang