Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: no repeat for rand
Date: Thu, 24 Jul 2008 11:44:23 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 33
Message-ID: <g69pun$lo$1@fred.mathworks.com>
References: <g69avu$ai0$1@fred.mathworks.com> <g69bin$ff5$1@fred.mathworks.com> <g69g1r$60c$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 1216899863 696 172.30.248.37 (24 Jul 2008 11:44:23 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 24 Jul 2008 11:44:23 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:481489



"ching l" <chinglnc@hotmail.com> wrote in message 
<g69g1r$60c$1@fred.mathworks.com>...
> "us " <us@neurol.unizh.ch> wrote in message
> <g69bin$ff5$1@fred.mathworks.com>...
> > "ching l":
> > <SNIP nonrandomly randomness...
> > 
> > > is it possible to limit rand value so that it 
doesn't 
> > repeat...
> > 
> > a hint:
> > 
> >      help randperm;
> > 
> > us
> 
> 
> It says exceeds matrix dimensions, any idea why?
> 
> a{5} = {audio, fs};
> 
> fixrand= ceil(length(samples)*rand);
> fixrand= randperm(5); 
> 
> wavplay(a{fixrand)}{:});
> 
> 

start over... you are assigning 2 values of fixrand 
without doing anything with the first one.  and your () 
and {} don't match up in your wavplay function.  then what 
are audio and fs?