mercredi 28 décembre 2022

Generate a random vector elements that sum up to one?

Let us consider that we have a vector V. Where V(1,6): the vector contains six columns (cases). How can I set up a random vector that will sum up to 1. I mean that: sum(V(1,:)) == 1 ). Where all the elements should be between 0 and 1. Upperbounder =1 and lowbounder =1.




Aucun commentaire:

Enregistrer un commentaire