how can we generate a vector of length 100 with random number in between 0 and 1 with uniform probability such that sum of these numbers/100 is equal to 0.75

조회 수: 5 (최근 30일)
need X vector of length 100 which only contains values in between 0 and 1
like X = [0.8 0.03 0.5 0.8 0.95 .......] such that sum(X)/100 = 0.75

채택된 답변

Rohit Pappu
Rohit Pappu 2021년 3월 15일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by