Path: news.mathworks.com!not-for-mail
From: "Titus" <titus.edelhofer@mathworks.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: matlab random object
Date: Thu, 17 Jul 2008 13:22:02 +0200
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <g5na0q$bbv$1@fred.mathworks.com>
References: <g57qt2$s1s$1@fred.mathworks.com> <g584c3$17v$1@canopus.cc.umanitoba.ca> <g5892p$9q7$1@fred.mathworks.com> <gaOdk.10360$LG4.6975@nlpi065.nbdc.sbc.com> <g58c48$cfa$1@canopus.cc.umanitoba.ca> <g5n53a$nja$1@fred.mathworks.com>
NNTP-Posting-Host: de-edelhoft-x.ac.mathworks.de
X-Trace: fred.mathworks.com 1216293722 11647 172.16.75.150 (17 Jul 2008 11:22:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 17 Jul 2008 11:22:02 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Xref: news.mathworks.com comp.soft-sys.matlab:479948




"ching l" <chinglnc@hotmail.com> schrieb im Newsbeitrag 
news:g5n53a$nja$1@fred.mathworks.com...
> Is it possible to know the value of the rand?
>
> Because I need to generate the results later, with its
> corresponded audio.
>
> for example something like this:
>
> wavplay(samples{ceil(length(samples)*rand)}{:}) ;
>
> csvwrite('subject1.dat',[(value of the rand);00s]);
>
> Is it possible to do that?
>
>
>

Hi,
just for the rand, not looking at the rest of the code. What about

randValue = rand;
wavplay(samples{ceil(length(samples)*randValue)}{:}) ;
csvwrite('subject1.dat',[randValue;00s]);

Titus