how to generates random numbers ?

hello anyone know how to generate random number as N*1 vector but their summation should be specific number for example if this number is 5 the random numbers should be {3 0 2}or{1 2 1} or any combination that give summation of 5

 採用された回答

José-Luis
José-Luis 2016 年 6 月 29 日

0 投票

1 件のコメント

m. muner
m. muner 2016 年 6 月 30 日
exactly thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeRandom Number Generation についてさらに検索

質問済み:

2016 年 6 月 29 日

コメント済み:

2016 年 6 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by