Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: pseudorandom number generation
Date: Thu, 19 Jan 2012 17:14:10 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 7
Message-ID: <jf9j12$psm$1@newscl01ah.mathworks.com>
References: <jf9iea$nuq$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1326993250 26518 172.30.248.48 (19 Jan 2012 17:14:10 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 19 Jan 2012 17:14:10 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:755167

"Arman " <arman.eshaghi@gmail.com> wrote in message <jf9iea$nuq$1@newscl01ah.mathworks.com>...
> I need 3 digits( 1, 2 and 3) each one generated for 10 times (a total of 30) in a random order. How could I do this in MATLAB?
- - - - - - - -
 v = repmat(1:3,1,10);
 v = v(randperm(10*3));

Roger Stafford