x=0.1;
maxloops=11;
tsts=[1:maxloops]/10;
for tst=tsts
rsum=0;
cnt=0;
display(strcat('tst=',num2str(tst),'-------------'))
while 1
    cnt=cnt+1;
    rsum=rsum+x;
    testit=rsum-tst;
    if rsum == tst
    display('test met')
    break
    end
   
   if testit > 0.0
    display(strcat('rsum-tst=',num2str(testit)))
    display('test not met - went positive')
    break
   end
  
end
end


% counter_v4 m file