필터 지우기
필터 지우기

How to randomized a n by m matrix ?

조회 수: 3 (최근 30일)
Charlene Mae Galang
Charlene Mae Galang 2017년 9월 3일
편집: Image Analyst 2017년 9월 3일
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