Path: news.mathworks.com!not-for-mail
From: "Ryan " <rtang@axiomvaluation.com>
Newsgroups: comp.soft-sys.matlab
Subject: Generate random matrix with constraints
Date: Tue, 16 Nov 2010 15:02:04 +0000 (UTC)
Organization: Axiom Valuation Solutions
Lines: 9
Message-ID: <ibu6dc$elk$1@fred.mathworks.com>
Reply-To: "Ryan " <rtang@axiomvaluation.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1289919724 15028 172.30.248.37 (16 Nov 2010 15:02:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 16 Nov 2010 15:02:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2610542
Xref: news.mathworks.com comp.soft-sys.matlab:687278

Hi,

I want to generate a random, let's say, 5 by 5 matrix, with one constraint that the sum of each row of the matrix is 1.

What's the code for that?

Thank you so much for your help!

Ryan