MATLAB: Root raised cosine pulse

root raised cosine

B=0.5; %Beta value
Ts = 0.01; %Sampling interval
N=2000; %Number of samples
t=-20:Ts:(N-1)*Ts;
%Formula
pt_RootRaisedCosine = ((sin(pi*t.*(1-B)) + 4*B*t.*cos(pi*t*(1+B))) ./ (pi*t.*(1-(4*B*t).^2)));
plot(pt_RootRaisedCosine);
Hello,
I am trying to plot root raised cosine pulse for Beta equal to 0.5. But the issue in graph is, there is a little space. I am unable to figure out. Can someone help!

Best Answer

t.*(1-(4*B*t).^2) is 0 at indices 1951 2001 2051 . For one of those it is because t == 0, and for the other two it is because 4*B*t == 1 so the 1 minus equals 0.