T=1;

n=1;
m=2;

A=2;

f=-2.1:0.001:2.1;
N=4201;
y= zeros(1,N);
z=zeros(1,N);
%phi0= 16*T*T/pi/pi;
for j=1:N
phi_qpsk = A*A*T *( sin(pi*f(j)*T)^2 )/ (  (pi*f(j)*T)^2 ) ;
phi_sin_qpsk = 4*A*A*T/pi/pi* ( (cos(pi*f(j)*T) )^2 ) / ( (4*T*T*f(j)*f(j)-1)^2 );
if phi_qpsk > A*A*T/2
    f3db= f(j);
end
if phi_sin_qpsk >= 2*A*A*T/pi/pi
    f3db2= f(j);
end
%if phi_sin_qpsk > 1.1927/2 
%    f3db2 = f(j);
%end
%phi_fsk = T/4/pi/pi* ( ( (n*sin(2*pi*f(j)*T-n*pi)/(4*f(j)*f(j)*T*T - n*n)) - (m*sin(2*pi*f(j)*T-m*pi)/(4*f(j)*f(j)*T*T- m*m))  )^2 ) ;
y(j)= phi_qpsk;
z(j)= phi_sin_qpsk;
end



plot (f,y,f,z,'--');
legend('QPSK', 'half-Sin-QPSK');