Skip to main content

Phase modulation for square waveform IN MATLAB

MATLAB CODE


fm = 1000;fm=7;
Tm=1/fm;
Ac = 1;
Am=1;
t = 0:Tm/999:Tm*2;
fc =30;
s=square(2*pi*t*fm);
subplot(2,1,1);
plot (t,s);
title ('Square Waveform');
grid on;
K= 2*pi*0.333
y2=Ac*cos(2*pi*fc*t+K*s);
subplot(2,1,2);
plot(t,y2);
grid on;
title('phase Modulated signal');
   
                                                                            Output




Inference:

     In square wave as message signal phase changes from 180

     degrees to -180 degrees so the PM signal also changes direction

     suddenly and give sharp point.




Comments