(New page: Part B: Find the Bug Task: Find the bug in the following code F0=13; T0=1/F0; Ts=0.07; <nowiki> /_/_/ ~/o \~ >(: =====} ~\o___/~ \ \ \</nowiki> t=0:Ts:13*T0; x = real(ex...)
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Part B: Find the Bug
+
'''Part B: Find the Bug'''
  
 
Task: Find the bug in the following code
 
Task: Find the bug in the following code
Line 18: Line 18:
  
 
plot(t,x)
 
plot(t,x)
 +
 +
 +
----
  
 
Well, besides the bug in the blue box, the sampling frequency is much to large. For a really smooth sinusoid, reduce it to Ts = 0.0007
 
Well, besides the bug in the blue box, the sampling frequency is much to large. For a really smooth sinusoid, reduce it to Ts = 0.0007

Latest revision as of 14:35, 12 September 2008

Part B: Find the Bug

Task: Find the bug in the following code

F0=13;

T0=1/F0;

Ts=0.07;

    /_/_/
  ~/o   \~
>(: =====}
  ~\o___/~
    \ \ \

t=0:Ts:13*T0;

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

plot(t,x)



Well, besides the bug in the blue box, the sampling frequency is much to large. For a really smooth sinusoid, reduce it to Ts = 0.0007

Alumni Liaison

ECE462 Survivor

Seraj Dosenbach