(→Finding the bug) |
m (→Finding the bug) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
<pre>% Ts was originally set to 1/13 (aka T0) and the graph displayed only one cycle. Since we want 13 | <pre>% Ts was originally set to 1/13 (aka T0) and the graph displayed only one cycle. Since we want 13 | ||
− | % cycles, divide this previous Ts value by 13 again. Using Ts = T0/13 the proper | + | % cycles, divide this previous Ts value by 13 again. Using Ts = T0/13 the proper graph is shown. |
F0 =13; | F0 =13; |
Latest revision as of 09:46, 12 September 2008
Finding the bug
% Ts was originally set to 1/13 (aka T0) and the graph displayed only one cycle. Since we want 13 % cycles, divide this previous Ts value by 13 again. Using Ts = T0/13 the proper graph is shown. F0 =13; T0 =1/F0; Ts = T0/13; t = 0:Ts:13*T0; x = real(exp(j*(2*pi*F0*t-pi/2))); plot(t,x)