Generate random number from fixed interval
Posted: Mon Jun 30, 2014 10:11 pm
Hi, if I want to generate a series of random number which is only draw from a given interval, e.g. random number from interval [-1,1]. How should I write in the program code?
Another question is, if I only want to draw some fixed number randomly, example I only want to draw a number from 2 fixed numbers i.e. -1 and 1 randomly, how should I write in my program code?
Another question is, if I only want to draw some fixed number randomly, example I only want to draw a number from 2 fixed numbers i.e. -1 and 1 randomly, how should I write in my program code?