-
2 Comments
niko_k
on 27 Aug 2013
solution is correct in my opinion.
Tim
on 27 Aug 2013
rand(1,1)*5+1 will produce random numbers uniformly distributed between 1 and 6; round will convert values from 1 to 1.5 to 1, and values from 1.5 to 2.5 to 2, so 1 will occur only about half as often as 2. Overall, 1 and 6 will occur only about half as often as 2, 3, 4, and 5.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!