%it is not required that as eye diagram seems good that ber is also good as
%one can be reversed to zeros but the level difference is high so eye
%diagram is good 

OutputPort1=InputPort1;
OutputPort2=InputPort2;
A1=(InputPort1.Sampled.Signal);
A2=(InputPort2.Sampled.Signal);

for i=1:1000
x1=A1*exp(-1i*5.84*10^6*1000);
y1=(1-exp(-1i*5000*1000))/(-1i*(5000));
z1=exp(-1i*5.84*10^6*1000)*(-1i*10*A2*y1);
E1=x1+z1;
mean(abs(z1))
mean(abs(x1))


x2=A2*exp(-1i*5.845*10^6*1000);
y2=(1-exp(-1i*-5000*1000))/(-1i*(-5000));
z2=exp(-1i*5.845*10^6*1000)*(-1i*10*A1*y2);
E2=x2+z2;
mean(abs(z2))
mean(abs(x2))

A1=E1;
A2=E2;

end

OutputPort1.Sampled.Signal=E1;
OutputPort2.Sampled.Signal=E2;