Page 110 -
P. 110
intm=zeros(1,p);
for k=1:p-1
intm(k+1)=intm(k)+0.5*dt*(m(k+1)+m(k));
end
subplot(2,2,2)
plot(t,intm)
title('Modulation Phase')
uc=exp(j*(2*pi*fc*t+2*pi*kf*intm));
u=real(uc);
phase=unwrap(angle(uc))-2*pi*fc*t;
subplot(2,2,3)
plot(t,u)
axis([-0.15 0.15 -1 1])
title('Modulated Signal')
Dphase(1)=0;
for k=1:p-1
Dphase(k+1)=(2/dt)*(phase(k+1)-phase(k))-...
Dphase(k);
end
md=Dphase/(2*pi*kf);
subplot(2,2,4)
plot(t,md)
title('Reconstructed Message')
As can be observed by examining Figure 4.1, the results of the simulation
are very good, giving confidence in the expressions of the iterators used.
4.6 A Better Numerical Integrator: Simpson’s Rule
Prior to discussing Simpson’s rule for integration, we shall derive, for a sim-
ple case, an important geometrical result.
THEOREM
The area of a parabolic segment is equal to 2/3 of the area of the circumscribed paral-
lelogram.
© 2001 by CRC Press LLC