(New page: <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> The graph produced by this code is a wave that appears "blocky". There reason f...) |
|||
Line 8: | Line 8: | ||
</pre> | </pre> | ||
− | The graph produced by this code is a wave that appears "blocky". There reason for this is because the sampling | + | The graph produced by this code is a sinusoidal wave that appears "blocky". There reason for this is because the sampling rate is too large. The period of the wave is coded as 1/F0, which equals .0769. However, the value for Ts is .07, almost the size of one cycle. This problem can be fixed by reducing the value of Ts. Below is an example of this fix: |
<pre> | <pre> |
Revision as of 15:39, 11 September 2008
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)
The graph produced by this code is a sinusoidal wave that appears "blocky". There reason for this is because the sampling rate is too large. The period of the wave is coded as 1/F0, which equals .0769. However, the value for Ts is .07, almost the size of one cycle. This problem can be fixed by reducing the value of Ts. Below is an example of this fix:
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)