(→Fix) |
(→Problem) |
||
Line 3: | Line 3: | ||
The problem of the program is that the Ts value is too big. | The problem of the program is that the Ts value is too big. | ||
− | T0=1/F0=0.76, and Ts=0.7 is almost a whole period. | + | T0=1/F0=0.76, and Ts=0.7 is almost a whole period.The step of the approximation is so big that it only take approximate 1 point in each period, which is not adequate for sketching the graph. |
− | + | ||
== Fix == | == Fix == |
Revision as of 08:53, 6 September 2008
Problem
The problem of the program is that the Ts value is too big. T0=1/F0=0.76, and Ts=0.7 is almost a whole period.The step of the approximation is so big that it only take approximate 1 point in each period, which is not adequate for sketching the graph.
Fix
Decrease the value of Ts.
Matlab Code
f0=13; t0=1/f0; ts=0.07/100; t=0:ts:13*t0; x=real(exp(j*(2*pi*f0*t-pi/2))); plot(t,x);