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

1 次查看(过去 30 天)
I want to generate a random vector. if i add all the values in the generated vector, its sum should be equal to 1.

回答(1 个)

James Tursa
James Tursa 2020-3-4
  4 个评论
balaji
balaji 2020-3-4
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by