function[x,y]=iter(ys,yps,mns)
% Reconstruction ys = reference signal, mns= sampled measurement
% x=fraction of the reconstructed amplitude
% y=reconstructed time in samples (tstep is not known)
% disp ('iter');
% figure(1000); subplot(3,1,1); plot(mns,'b');
% subplot(3,1,2); plot(yps,'r'); subplot(3,1,3);
% plot(ys,'black'); pause;
a=sum(ys.^2);                       % 8 ck
b=sum(ys.*yps); bp=sum(yps.^2);     % ''
d=b^2-a*bp;                         % 8 ck
smns=size(mns,2)    ;   
ys=ys(1:smns); yps=yps(1:smns);
size(mns); size(ys);                
% figure(20); plot(mns/max(mns),'r'); hold; plot(ys/max(ys),'b');
mp=sum(mns.*ys); mps=sum(mns.*yps); % 8 ck
x=(b/d)*mps-(bp/d)*mp;              % 3 ck
y=-(((a/d)*mps + (b/d)*mp)/x);      % '' 2 ck
% 30 x 5ns ck period =150ns/iteration