Skip to main content
. 2020 Dec 23;26(1):20. doi: 10.3390/molecules26010020
Algorithm 1 Random Function (Matlab)
function y=aleat(x,x2)
    dang=abs(x-x2);
    dt=rand() * dang;
    if x > x2
    y=x2+dt;
    else
    y=x+dt;
    end
end