How to generate a vector of random numbers whose total must be equal to 1?

2 views (last 30 days)
I want to generate a random vector. if i add all the values in the generated vector, its sum should be equal to 1.

Answers (1)

James Tursa
James Tursa on 4 Mar 2020
  4 Comments
balaji
balaji on 4 Mar 2020
No. I want 1 row having 3 values (column) (for example s = 0.5 0.3 0.2) whose sum should be equal to 1

Sign in to comment.

Categories

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!