function [ l ] = recbinsrch( A, info, imin, imax )
%RECBINSRCH searches array A for info recursively.
%   Searches only the part between imin and imax.
%   Minas Spetsakis, Nov. 2018

if imin>imax
    l=0;
    return;
end
imin
m = round((imin+imax)/2);
if A(m)==info
    l=m;
    return
end
if A(m)>info
    l = recbinsrch(A, info, imin, m-1);
    return
end
l = recbinsrch(A, info, m+1, imax);

end

