Path: news.mathworks.com!not-for-mail
From: "kk KKsingh" <akikumar1983@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: How to generate non-repeating random integers
Date: Wed, 26 May 2010 22:03:07 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <htk5qr$nos$1@fred.mathworks.com>
References: <htk4jc$4nh$1@fred.mathworks.com>
Reply-To: "kk KKsingh" <akikumar1983@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1274911387 24348 172.30.248.38 (26 May 2010 22:03:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 26 May 2010 22:03:07 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2203438
Xref: news.mathworks.com comp.soft-sys.matlab:639632

"Gonzalo " <glpita@gmail.com> wrote in message <htk4jc$4nh$1@fred.mathworks.com>...
> Hi all,
> 
> Does anybody know how to generate a series of say 450 non-repeating random integers between 0 and 2000?
> 
> Thanks

A SIMPLE SOLUTION
r=randperm(2000);
m=450;
r=r(1:450);