Azzera filtri
Azzera filtri

How to randomized a n by m matrix ?

3 visualizzazioni (ultimi 30 giorni)
Charlene Mae Galang
Charlene Mae Galang il 3 Set 2017
Modificato: Image Analyst il 3 Set 2017
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]

Risposte (1)

Roger Stafford
Roger Stafford il 3 Set 2017
Modificato: Stephen23 il 3 Set 2017
You can use my File Exchange routine “randfixedsum” at:
to obtain your 1 sums with values between -1 and 1.

Categorie

Scopri di più su Random Number Generation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by