The bug that this code has is that the value of Ts is too low. As a result, it is unable to show all 13 cycles that it's meant to show. All I modified to this code was insert one more zero into the value of Ts so that it became 0.007, as shown below:
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)