how to generate and precise double value?
조회 수: 1(최근 30일)
표시 이전 댓글
I want to ask you How I can generate probability values randomly between 0 and 1, but 1 and 0 can include as probability value
I have a vector of values X=[12 5 10 50 22]
each value of X must have a probability where 0<=p>=1
when I obtain probability like 0.98555 I want just pick 0.9
How I can do that.?
Please help me!
댓글 수: 0
Walter Roberson 2020년 10월 27일
randi([0 10], size(x))./10
댓글 수: 1
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!