Part B: Find the Bug
The original Matlab code:
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)
This code produces an accurate plot of the real part of the signal it is attempting to plot. However, because the sampling frequency is so large, the plotted points make the signal look as if it is not periodic. In order to correct this mistake, the variable Ts needs to be much smaller.
New Matlab code:
F0 =13;
T0 =1/F0;
Ts = 0.01*T0;
t = 0:Ts:13*T0;
x = real(exp(j*(2*pi*F0*t-pi/2)));
plot(t,x)