T_s = 1;
delta_t = 0:.01:T_s/2;
sumn = -20:T_s:20;
sir = zeros(size(delta_t));

for i = 1:length(delta_t)
    sir(i) = (sinc(delta_t(i)/T_s))^2 / sum((sinc((sumn + delta_t(i))./T_s)).^2);
end

figure;
subplot(2,1,1);
plot(-20:.01:20, sinc((-20:.01:20)./T_s));
title('p(t) = sinc(t/T_s)'); xlabel('t');
subplot(2,1,2);
plot(delta_t,sir);
title('PAM synchronization signal-to-interference power ratio');
xlabel('\Delta t');