I am trying to create a random number generator between two numbers in MatLab but I am unable to figure out the correct equation.
I know that you can use the r
r
The answer for adjusting the interval is listed in the help section on rand() :
rand()
Example 1
Generate values from the uniform distribution on the interval [a, b]: r = a + (b-a).*rand(100,1);
r = a + (b-a).*rand(100,1);