(→Problem) |
(→Matlab Code) |
||
Line 12: | Line 12: | ||
f0=13; | f0=13; | ||
t0=1/f0; | t0=1/f0; | ||
− | ts=0.07/100; | + | ts=0.07/100; %where I fixed |
t=0:ts:13*t0; | t=0:ts:13*t0; | ||
x=real(exp(j*(2*pi*f0*t-pi/2))); | x=real(exp(j*(2*pi*f0*t-pi/2))); | ||
plot(t,x); | plot(t,x); | ||
</pre> | </pre> |
Latest revision as of 08:54, 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; %where I fixed t=0:ts:13*t0; x=real(exp(j*(2*pi*f0*t-pi/2))); plot(t,x);