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 |
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 |