<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/167748</link>
    <title>MATLAB Central Newsreader - Uniform distribution</title>
    <description>Feed for thread: Uniform distribution</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, 17 Apr 2008 08:56:01 -0400</pubDate>
      <title>Uniform distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/167748#427210</link>
      <author>Jason </author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
I am currently doing some stats in MATLAB. &lt;br&gt;
&lt;br&gt;
I've been using &lt;br&gt;
&lt;br&gt;
R = normrnd(mean,sigma,[100 1])&lt;br&gt;
&lt;br&gt;
to generate 100 random numbers from a normal distribution&lt;br&gt;
with &quot;mean&quot; and standard deviation &quot;sigma&quot;. &lt;br&gt;
&lt;br&gt;
I now want to do the same for a uniform distribution. &lt;br&gt;
&lt;br&gt;
Is is the case that &lt;br&gt;
&lt;br&gt;
R = unifrnd(A.B, [100 1])&lt;br&gt;
&lt;br&gt;
is what I should use. Are A and B are the lower and upper&lt;br&gt;
ranges. The help isn't to specific but I'm assuming this is&lt;br&gt;
the case.&lt;br&gt;
&lt;br&gt;
Thanks</description>
    </item>
    <item>
      <pubDate>Thu, 17 Apr 2008 09:25:05 -0400</pubDate>
      <title>Re: Uniform distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/167748#427216</link>
      <author>helper </author>
      <description>&quot;Jason &quot; &amp;lt;j_henderson44@REMOVEhotmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fu73b1$gc9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am currently doing some stats in MATLAB. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I've been using &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; R = normrnd(mean,sigma,[100 1])&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; to generate 100 random numbers from a normal distribution&lt;br&gt;
&amp;gt; with &quot;mean&quot; and standard deviation &quot;sigma&quot;. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I now want to do the same for a uniform distribution. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Is is the case that &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; R = unifrnd(A.B, [100 1])&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; is what I should use. Are A and B are the lower and upper&lt;br&gt;
&amp;gt; ranges. The help isn't to specific but I'm assuming this &lt;br&gt;
is&lt;br&gt;
&amp;gt; the case.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I agree that the documentation for this function isn't too &lt;br&gt;
specific.  One good thing about MATLAB is the fact that you &lt;br&gt;
can open and read many of the functions.  If you check out &lt;br&gt;
the code for UNIFRND, you will see it is simply a &lt;br&gt;
fanicified wrapper for the operation:&lt;br&gt;
&lt;br&gt;
R = A + (B-A)*rand(m)&lt;br&gt;
&lt;br&gt;
where A and B are your lower and upper bounds and m is a 1-&lt;br&gt;
by-2 matrix of sizes [nRows nCols].</description>
    </item>
    <item>
      <pubDate>Thu, 17 Apr 2008 12:27:01 -0400</pubDate>
      <title>Re: Uniform distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/167748#427256</link>
      <author>Jason </author>
      <description>&quot;helper &quot; &amp;lt;spamless@nospam.com&amp;gt; wrote in message&lt;br&gt;
&amp;lt;fu751h$qq2$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;Jason &quot; &amp;lt;j_henderson44@REMOVEhotmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &amp;lt;fu73b1$gc9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &amp;gt; Hello,&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I am currently doing some stats in MATLAB. &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I've been using &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; R = normrnd(mean,sigma,[100 1])&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; to generate 100 random numbers from a normal distribution&lt;br&gt;
&amp;gt; &amp;gt; with &quot;mean&quot; and standard deviation &quot;sigma&quot;. &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; I now want to do the same for a uniform distribution. &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Is is the case that &lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; R = unifrnd(A.B, [100 1])&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; is what I should use. Are A and B are the lower and upper&lt;br&gt;
&amp;gt; &amp;gt; ranges. The help isn't to specific but I'm assuming this &lt;br&gt;
&amp;gt; is&lt;br&gt;
&amp;gt; &amp;gt; the case.&lt;br&gt;
&amp;gt; &amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; Thanks&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I agree that the documentation for this function isn't too &lt;br&gt;
&amp;gt; specific.  One good thing about MATLAB is the fact that you &lt;br&gt;
&amp;gt; can open and read many of the functions.  If you check out &lt;br&gt;
&amp;gt; the code for UNIFRND, you will see it is simply a &lt;br&gt;
&amp;gt; fanicified wrapper for the operation:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; R = A + (B-A)*rand(m)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; where A and B are your lower and upper bounds and m is a 1-&lt;br&gt;
&amp;gt; by-2 matrix of sizes [nRows nCols].&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Many thanks. I ended up plotting it to check. I wasn't aware&lt;br&gt;
I could open the code to check it. How would I do this?&lt;br&gt;
&lt;br&gt;
Thanks. </description>
    </item>
    <item>
      <pubDate>Thu, 17 Apr 2008 12:42:02 -0400</pubDate>
      <title>Re: Uniform distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/167748#427258</link>
      <author>Jason </author>
      <description>&quot;Jason &quot; &amp;lt;j_henderson44@REMOVEhotmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Many thanks. I ended up plotting it to check. I wasn't aware&lt;br&gt;
&amp;gt; I could open the code to check it. How would I do this?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks. &lt;br&gt;
&lt;br&gt;
Oops forget that. Fairly obvious. Thanks for suggestion.</description>
    </item>
  </channel>
</rss>

