clc;
clear;
close;
N=input('enter the input sequence');
N1=ones(1,length(N));
N1(N==0)=-1;
unipolar=zeros(1,10*length(N));
bipolar=zeros(1,10*length(N));
v=1:10:10*length(N);
for i=1:length(v)
    unipolar(v(i):v(i)+9)=N(i);
    bipolar(v(i):v(i)+9)=N1(i);
end
subplot(2,1,1);
plot(unipolar);

title('unipolar plot');
subplot(2,1,2);
plot(bipolar);

title('bipolar plot');

