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]

回答(1 个)

Roger Stafford
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.

类别

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