From: "Rui Yang" <rui.yang@mathworks.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: How to generate a random data?
Message-ID: <ef5ede4.-1@webcrossing.raydaftYaTP>
Date: Fri, 27 Jul 2007 00:26:54 -0400
Organization: The MathWorks, Inc.
Lines: 1
Reply-To: "Rui Yang" <rui.yang@mathworks.com>
NNTP-Posting-Host: webapp-01-blr.mathworks.com
X-Trace: fred.mathworks.com 1185510414 28203 172.30.248.36 (27 Jul 2007 04:26:54 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 27 Jul 2007 04:26:54 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1067979
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:421323



I want to generate a random sequence. For example(1,2,3,4).The probability distributing of each element is (20%, 20%, 20%, 40%). How to realize it in Matlab?