Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: randperm
Date: Sun, 27 Jul 2008 12:40:39 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 38
Message-ID: <g6hqc7$gck$1@fred.mathworks.com>
References: <g6fu97$7ru$1@fred.mathworks.com> <g6g0ia$vp$1@fred.mathworks.com> <g6g1m3$cec$1@fred.mathworks.com> <g6hdm9$j18$1@fred.mathworks.com>
Reply-To: "ching l" <chinglnc@hotmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1217162439 16788 172.30.248.35 (27 Jul 2008 12:40:39 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 27 Jul 2008 12:40:39 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:482050



"Bruno Luong" <b.luong@fogale.findmycountry> wrote in
message <g6hdm9$j18$1@fred.mathworks.com>...
> "ching l" <chinglnc@hotmail.com> wrote in message
> <g6g1m3$cec$1@fred.mathworks.com>...
> > I want to have random number from
> > 1 to 6, for six time, and no repeat number.
> > 
> 
> And what do you get with one call of randperm(6)? Can you
> try to describe it in words and see how it fits with what
> you wrote above.
> 
> Bruno

I have six audio files, 

sample{1}= wavread('audio1.wav');
sample{2}= wavread('audio2.wav');
sample{3}= wavread('audio3.wav');
sample{4}= wavread('audio4.wav');
sample{5}= wavread('audio5.wav');
sample{6}= wavread('audio6.wav');

wavplay= sample(round{random number});

so, when I call the wavplay everytime, it should play
different audio each time. 

but randperm(6) = (3 4 5 1 2 6);

possible to work around with that?