I am doing phase shift keying of binary data.
This is what I am doing,
f=10;
m=[];
b = [1 0 0 1 1 1 0]
for i=1:1:length(b)
if (b(i)==1)
Modulated=10*cos(2*pi*f*t2);
else
Modulated=10*cos(2*pi*f*t2 + pi);
end
m=[m Modulated];
end
The phase is not changing when there is a difference from last bit to present bit or present bit to future bit.
How can I change the phase when there is a difference in the bit value?
Edit: The pic with complete system. I am using equiripple filter.