
function x=raised_cosine(t)
T=1;
t=abs(t);	% symmetical around zero
beta=0.25;
if t==0		% one pole at zero
   x=1;
elseif t==sqrt(1/(4*(beta^2)))*T     % another pole
   A1=0.5*cos(pi*(1-beta)/(2*beta))*(pi/T)*(1-beta);
   A2=0.5*cos(pi*(1+beta)/(2*beta))*(pi/T)*(1+beta);
   B=(pi/T)*(1-3);
   x=(A1+A2)/B;
else
  x=sin(pi*t/T)*cos(pi*beta*t/T)/(pi*t/T)/(1-4*(beta^2)*(t^2)/(T^2));
end
