Path: news.mathworks.com!not-for-mail
From: "Derek O'Connor" <derekroconnor@eircom.net>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Random Integers Within Specfic Ranges
Date: Mon, 14 Mar 2011 15:58:05 +0000 (UTC)
Organization: University College Dublin
Lines: 7
Message-ID: <illdud$p3s$1@fred.mathworks.com>
References: <ildgd8$dhl$1@fred.mathworks.com> <ilfv5b$6pa$1@fred.mathworks.com> <ilg1cg$r6q$1@fred.mathworks.com> <ilgau4$5hb$1@fred.mathworks.com> <ilgfk4$4s1$1@fred.mathworks.com> <iljb6o$fns$1@fred.mathworks.com> <ilko3h$9ju$1@fred.mathworks.com>
Reply-To: "Derek O'Connor" <derekroconnor@eircom.net>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1300118285 25724 172.30.248.37 (14 Mar 2011 15:58:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 14 Mar 2011 15:58:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 87230
Xref: news.mathworks.com comp.soft-sys.matlab:715729

Two small tweaks:

Change  p(1:m) =  U+1  to p = zeros(1,m);

Change  while member(r,p,k)  to  while  member(r,p,k-1)

Derek O'Connor