You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sorry I am chinese ,not good at english,may be read not good
rob.normal(0, 1.0)
see the doc ,I have see min and max ,but when I set min = 1 max = 8 ,it seens do not work, emm........it is can't set? need make it self ? only for read?
The text was updated successfully, but these errors were encountered:
Yes, min and max are only for reading. They tell you the minimum and maximum value the distribution may produce.
There is no way to truely generate a normal distribution who values are bound by a min and max. The best you can do is to either discard the number if outside the range, or clamp the value. For example
varr=Prob.normal(0,1.0);// Discard and pick anotherx=r();while(x<1||x>8){x=r();}
or
varr=Prob.normal(0,1.0);// Clamp the valuex=r();if(x<1){x=1;}elseif(x>8){x=8;}
sorry I am chinese ,not good at english,may be read not good
rob.normal(0, 1.0)
see the doc ,I have see min and max ,but when I set min = 1 max = 8 ,it seens do not work, emm........it is can't set? need make it self ? only for read?
The text was updated successfully, but these errors were encountered: