Girly_girl
Full Member level 2
Hey guys
Hope u r all well.
I have written a matlab code for PSK.. and it produces a graph... but i know that the graph is not what im looking for .. it doesnt produces a correct phase shift..
The code is :
% % Generating a input square wave
x1 = 0pi/100)20*pi);
y1 = square(x1);
A = plot(x1,y1);
figure(1),A,title( 'Square wave');xlabel('x'); ylabel('y');ylim([-2,2]);grid;
% Generating the PSK signal
y1(y1>0)=1;
y1(y1<0)=0;
N = y1.*pi;
f=1;
t = 0pi/100)20*pi);
PSK = sin(2*pi*f*(t+ N));
figure(2),plot(t,PSK),title('PSK Signal');xlabel('x'); ylabel('y');ylim([-2,2]); xlim([0,35]);grid;
The PSK signal it produces is :
Hope u r all well.
I have written a matlab code for PSK.. and it produces a graph... but i know that the graph is not what im looking for .. it doesnt produces a correct phase shift..
The code is :
% % Generating a input square wave
x1 = 0pi/100)20*pi);
y1 = square(x1);
A = plot(x1,y1);
figure(1),A,title( 'Square wave');xlabel('x'); ylabel('y');ylim([-2,2]);grid;
% Generating the PSK signal
y1(y1>0)=1;
y1(y1<0)=0;
N = y1.*pi;
f=1;
t = 0pi/100)20*pi);
PSK = sin(2*pi*f*(t+ N));
figure(2),plot(t,PSK),title('PSK Signal');xlabel('x'); ylabel('y');ylim([-2,2]); xlim([0,35]);grid;
The PSK signal it produces is :