How to randomized a n by m matrix ?
3 ビュー (過去 30 日間)
古いコメントを表示
I want to randomize an n by m matrix containing numbers just between -1 to 1, where the sum of each row vector is equal to 1.
Ex. 3 by 2 matrix:
m = [.6 .3 .1; ...
.2 .7 .1]
0 件のコメント
回答 (1 件)
Roger Stafford
2017 年 9 月 3 日
編集済み: Stephen23
2017 年 9 月 3 日
You can use my File Exchange routine “randfixedsum” at:
to obtain your 1 sums with values between -1 and 1.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Random Number Generation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!