|
In article <g6a467$dtq$1@fred.mathworks.com>,
ching l <chinglnc@hotmail.com> wrote:
>[audio, fs] = wavread('F:\audio.wav');
>samples{6} = {audio, fs};
>[audio, fs] = wavread('F:\audio.wav');
>samples{10} = {audio, fs};
>playback= ceil(length(samples)*rand);
>How do I put the minimum value for "playback". I've tried
>the min function, but just can't get it right. Need a bit of
>help here. Not sure how to put it in right order.
Please expand on what you mean by 'How do I put the minimum value
for "playback"' ? The variable playback will be a scalar value there,
and so is its own minimum.
If you want to know what the minimum value is that you have ever
had generated, then you will have to keep track of the 'playback'
values somehow. For example,
persistent minplaybackvalue
if isempty(minplaybackvalue)
minplaybackvalue = playback;
else
minplaybackvalue = min(minplaybackvalue, playback);
end
--
"If there were no falsehood in the world, there would be no
doubt; if there were no doubt, there would be no inquiry; if no
inquiry, no wisdom, no knowledge, no genius."
-- Walter Savage Landor
|