Path: news.mathworks.com!not-for-mail
From: "Sadik " <sadik.hava@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: make random numbers from a vector
Date: Sat, 11 Jun 2011 18:20:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 7
Message-ID: <it0bkl$rj$1@newscl01ah.mathworks.com>
References: <istqhi$fjr$1@newscl01ah.mathworks.com> <istr33$hfk$1@newscl01ah.mathworks.com> <istv9r$po$1@newscl01ah.mathworks.com>
Reply-To: "Sadik " <sadik.hava@gmail.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1307816405 883 172.30.248.35 (11 Jun 2011 18:20:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 11 Jun 2011 18:20:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1666517
Xref: news.mathworks.com comp.soft-sys.matlab:731491

Or,

v = [0.2 0.6 1.2 0.7];
n = 100;
x = randsample(v,n,true);

Best.