how to transform this code which is for unipolar NRZ and its power spectral density to unipolar RZ and its spectral density ???
figure(1);
h=data;
n=1;
h(11)=1;
while nn);
else
y=(t==n);
end
d=plot(t,y);title('Code UNIPOLAR NRZ');grid on
set(d,'LineWidth',2.5);
hold on;
axis([0 5 -1.1 1.1]);
%Plotting of ones (1)
else
if h(n+1)==0
y=(t
figure(1);
h=data;
n=1;
h(11)=1;
while nn);
else
y=(t==n);
end
d=plot(t,y);title('Code UNIPOLAR NRZ');grid on
set(d,'LineWidth',2.5);
hold on;
axis([0 5 -1.1 1.1]);
%Plotting of ones (1)
else
if h(n+1)==0
y=(t