Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Randomization_same number
Date: Fri, 6 Nov 2009 23:48:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <hd2cjh$evv$1@fred.mathworks.com>
References: <hd249a$im2$1@fred.mathworks.com> <hd265a$e8e$1@fred.mathworks.com> <hd26rr$q78$1@fred.mathworks.com> <hd2a11$974$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257551281 15359 172.30.248.37 (6 Nov 2009 23:48:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 6 Nov 2009 23:48:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1507699
Xref: news.mathworks.com comp.soft-sys.matlab:583156


> So? Then be efficient in your code. Randperm is
> fast. It takes little effort to test to see if elements
> are consecutive. Use diff to do the test.
> 
> John

Thanks John. I do use the randperm function, but of course i have same trials in a row. I can find where (using diff as well), but still cannot solve the problem. 

I created a mask to get rid of all the numbers i've used, but i am not sure if it is efficient and worth trying -i am new in matlab. And besides, it doesn't work properly.

Thanks