MATLAB: Is there any difference between rand(n,1) and unifrnd(0, 1, n, 1)
random number generator
Is there any difference between
rand(n,1)
and
unifrnd(0, 1, n, 1)?
Best Answer
They both generate sample from uniform distribution,unifrnd offers a possibility to enter the parameters while withrand you need to adjust them, example of uniform distribution of interval [5,10] with size of 400 :
Best Answer