Code covered by the BSD License  

Highlights from
Continous phase FSK

Continous phase FSK

by

 

Continous phase frequency shift keying

CPFSK.m
%Program to perform CPFSK
clear all
close all
clc
x=input('Enter the bit-stream: ');
Tb=input('Enter Tb value: ');
n=length(x);
t=linspace(0,1);
f1=4;
f2=3;
h=Tb*(f1-f2);
k1=cos(2*pi*f1*t + pi*h*t/Tb); %Considering sqrt(2*Eb/Tb)=1
k2=cos(2*pi*f2*t - pi*h*t/Tb);
Xcpfsk=[];
x1=[];
for z=1:n
    if(x(z)==1)
        x1=[x1,ones(1,100)];
        Xcpfsk=[Xcpfsk,k1];
    elseif(x(z)==0)
        x1=[x1,zeros(1,100)];
        Xcpfsk=[Xcpfsk,k2];
    else
        disp('error');
        return
    end
end
subplot 211
plot(x1)
subplot 212
plot(Xcpfsk)

Contact us