(New page: == THE BUG == <pre> % Mark Frankosky % hw2.2 F0 =13; T0 =1/F0; Ts = 0.07; t = 0:Ts:13*T0*13; x = real(exp(j*2*pi*F0*t-pi/2)); % the bug was in the above line which read x = real(exp(...) |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
x = real(exp(j*2*pi*F0*t-pi/2)); | x = real(exp(j*2*pi*F0*t-pi/2)); | ||
% the bug was in the above line which read x = real(exp(j*(2*pi*F0*t-pi/2))); | % the bug was in the above line which read x = real(exp(j*(2*pi*F0*t-pi/2))); | ||
− | % which would have been e^(j*2*pi*F0*t)*e^(-pi/2) which wouldnt have been | + | % which would have been e^(j*2*pi*F0*t)*e^(j*-pi/2) which wouldnt have been |
− | % the same as having | + | % the same as having x = real(exp(j*2*pi*F0*t-pi/2)); which would then be |
− | % | + | % e^(j*2*pi*t)*e^(-pi/2) |
plot(t,x) | plot(t,x) | ||
</pre> | </pre> | ||
− | == | + | == PLOT == |
− | [[Image: | + | |
+ | Output plot | ||
+ | [[Image:PlotOutputPtB_ECE301Fall2008mboutin.jpg]] |
Latest revision as of 08:22, 12 September 2008
THE BUG
% Mark Frankosky % hw2.2 F0 =13; T0 =1/F0; Ts = 0.07; t = 0:Ts:13*T0*13; x = real(exp(j*2*pi*F0*t-pi/2)); % the bug was in the above line which read x = real(exp(j*(2*pi*F0*t-pi/2))); % which would have been e^(j*2*pi*F0*t)*e^(j*-pi/2) which wouldnt have been % the same as having x = real(exp(j*2*pi*F0*t-pi/2)); which would then be % e^(j*2*pi*t)*e^(-pi/2) plot(t,x)