(New page: ==Bugged Code== <pre> 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) </pre> ==Unbugged== The sampling rate is the same as the frequency, doing ...)
 
(No difference)

Latest revision as of 08:43, 12 September 2008

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

Unbugged

The sampling rate is the same as the frequency, doing this will not plot the proper amount of cycles. By decreasing the sampling rate we will get a much more accurate plot.

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