How can I generate random varaible from 0 to 1 without including 0?
1 view (last 30 days)
Show older comments
Hello every one,
I want to generate random values between 0 and 1, but not 0
I don t want to generate 0 as a random value.
thank you
0 Comments
Accepted Answer
Dave B
on 12 Sep 2021
The rand function generates randum numbers between 0 and 1, not including 0 or 1:
rand
rand(1,5)
rand(3)
1 Comment
More Answers (0)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!