Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!support1.mathforum.org!not-for-mail
From: Tim Smith <imaccormick@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Random matrix with zeros and ones and twos
Date: Mon, 10 Nov 2008 13:41:03 EST
Organization: The Math Forum
Lines: 9
Message-ID: <7946648.1226342494201.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 1226342494 18888 144.118.30.135 (10 Nov 2008 18:41:34 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Mon, 10 Nov 2008 18:41:34 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:500044


Hey,

I need to create a 100 x 100 matrix filled 80% with zeros, 10% with ones and 10% twos. The distribution should be random.

Could please someone help me?

cheers, 

Tim Smith