Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!news.mathforum.org!not-for-mail
From: Tim Smith <imaccormick@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: 5 Elements Randomly Distributed in Matrix
Date: Wed, 19 Nov 2008 14:17:05 EST
Organization: The Math Forum
Lines: 13
Message-ID: <30353534.1227122262474.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1227122262 8211 144.118.30.135 (19 Nov 2008 19:17:42 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Wed, 19 Nov 2008 19:17:42 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:501812


Hey everyone i hope you can help me with this problem:

I need to create a matrix where:

A% of the elements = 0
B% of the elements = 1
C% of the elements = 2
D% of the elements = 3
E% of the elements = 4

A+B+C+D+E=100%

and these values are randomly distributed throughout the matrix.