<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173182</link>
    <title>MATLAB Central Newsreader - min function</title>
    <description>Feed for thread: min function</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 24 Jul 2008 14:39:03 -0400</pubDate>
      <title>min function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173182#445186</link>
      <author>ching l</author>
      <description>[audio, fs] = wavread('F:\audio.wav');&lt;br&gt;
samples{6} = {audio, fs};&lt;br&gt;
&lt;br&gt;
[audio, fs] = wavread('F:\audio.wav');&lt;br&gt;
samples{10} = {audio, fs};&lt;br&gt;
&lt;br&gt;
playback= ceil(length(samples)*rand);&lt;br&gt;
&lt;br&gt;
How do I put the minimum value for &quot;playback&quot;. I've tried&lt;br&gt;
the min function, but just can't get it right. Need a bit of&lt;br&gt;
help here. Not sure how to put it in right order.&lt;br&gt;
&lt;br&gt;
Thanks.</description>
    </item>
    <item>
      <pubDate>Thu, 24 Jul 2008 17:29:25 -0400</pubDate>
      <title>Re: min function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173182#445241</link>
      <author>roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)</author>
      <description>In article &amp;lt;g6a467$dtq$1@fred.mathworks.com&amp;gt;,&lt;br&gt;
ching l &amp;lt;chinglnc@hotmail.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt;[audio, fs] = wavread('F:\audio.wav');&lt;br&gt;
&amp;gt;samples{6} = {audio, fs};&lt;br&gt;
&lt;br&gt;
&amp;gt;[audio, fs] = wavread('F:\audio.wav');&lt;br&gt;
&amp;gt;samples{10} = {audio, fs};&lt;br&gt;
&lt;br&gt;
&amp;gt;playback= ceil(length(samples)*rand);&lt;br&gt;
&lt;br&gt;
&amp;gt;How do I put the minimum value for &quot;playback&quot;. I've tried&lt;br&gt;
&amp;gt;the min function, but just can't get it right. Need a bit of&lt;br&gt;
&amp;gt;help here. Not sure how to put it in right order.&lt;br&gt;
&lt;br&gt;
Please expand on what you mean by 'How do I put the minimum value&lt;br&gt;
for &quot;playback&quot;' ? The variable playback will be a scalar value there,&lt;br&gt;
and so is its own minimum.&lt;br&gt;
&lt;br&gt;
If you want to know what the minimum value is that you have ever&lt;br&gt;
had generated, then you will have to keep track of the 'playback'&lt;br&gt;
values somehow. For example,&lt;br&gt;
&lt;br&gt;
persistent minplaybackvalue&lt;br&gt;
if isempty(minplaybackvalue)&lt;br&gt;
&amp;nbsp;&amp;nbsp;minplaybackvalue = playback;&lt;br&gt;
else&lt;br&gt;
&amp;nbsp;&amp;nbsp;minplaybackvalue = min(minplaybackvalue, playback);&lt;br&gt;
end&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&amp;nbsp;&amp;nbsp;&quot;If there were no falsehood in the world, there would be no&lt;br&gt;
&amp;nbsp;&amp;nbsp;doubt; if there were no doubt, there would be no inquiry; if no&lt;br&gt;
&amp;nbsp;&amp;nbsp;inquiry, no wisdom, no knowledge, no genius.&quot;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-- Walter Savage Landor</description>
    </item>
    <item>
      <pubDate>Thu, 24 Jul 2008 17:56:03 -0400</pubDate>
      <title>Re: min function</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173182#445256</link>
      <author>Bruno Luong</author>
      <description>&quot;ching l&quot; &amp;lt;chinglnc@hotmail.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;g6a467$dtq$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; [audio, fs] = wavread('F:\audio.wav');&lt;br&gt;
&amp;gt; samples{6} = {audio, fs};&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; [audio, fs] = wavread('F:\audio.wav');&lt;br&gt;
&amp;gt; samples{10} = {audio, fs};&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; playback= ceil(length(samples)*rand);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; How do I put the minimum value for &quot;playback&quot;. I've tried&lt;br&gt;
&amp;gt; the min function, but just can't get it right. Need a bit of&lt;br&gt;
&amp;gt; help here. Not sure how to put it in right order.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks.&lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
It's kind of count intuitive for normal people, I know, but&lt;br&gt;
if you wants to force a minimum value under which the&lt;br&gt;
playback values should not go below, then you should use 'max'.&lt;br&gt;
&lt;br&gt;
% Bruno</description>
    </item>
  </channel>
</rss>

