<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261927</link>
    <title>MATLAB Central Newsreader - Random matrix/normal distribution</title>
    <description>Feed for thread: Random matrix/normal 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>Tue, 29 Sep 2009 20:07:02 -0400</pubDate>
      <title>Random matrix/normal distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261927#683527</link>
      <author>Michael Grosswald</author>
      <description>I'm trying to generate random matrices whose entries are from the normal distribution.&lt;br&gt;
&lt;br&gt;
Something like this:&lt;br&gt;
&lt;br&gt;
(1/(sqrt(2*pi)))*exp(-(1+99*rand(5))^2/2)&lt;br&gt;
&lt;br&gt;
Isn't going to work because squaring a matrix doesn't square each entry. How can I correct this or am I going about this the wrong way.&lt;br&gt;
&lt;br&gt;
I'm still a MATLAB beginner so go easy on me!</description>
    </item>
    <item>
      <pubDate>Tue, 29 Sep 2009 20:09:13 -0400</pubDate>
      <title>Re: Random matrix/normal distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261927#683528</link>
      <author>dpb</author>
      <description>Michael Grosswald wrote:&lt;br&gt;
&amp;gt; I'm trying to generate random matrices whose entries are from the normal distribution.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Something like this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; (1/(sqrt(2*pi)))*exp(-(1+99*rand(5))^2/2)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Isn't going to work because squaring a matrix doesn't square each&lt;br&gt;
&amp;gt; entry. How can I correct this or am I going about this the wrong way.&lt;br&gt;
&lt;br&gt;
&amp;gt; I'm still a MATLAB beginner so go easy on me!&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Well,&lt;br&gt;
&lt;br&gt;
lookfor normal&lt;br&gt;
&lt;br&gt;
returns&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;gt;&amp;gt; lookfor normal&lt;br&gt;
RANDN  Normally distributed random numbers.&lt;br&gt;
...&lt;br&gt;
SPRANDN Sparse normally distributed random matrix.&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
which might look interesting... :)&lt;br&gt;
&lt;br&gt;
As for the question on squaring terms in an array (or vector), look at&lt;br&gt;
&quot;.*&quot; instead of &quot;*&quot;&lt;br&gt;
&lt;br&gt;
--</description>
    </item>
    <item>
      <pubDate>Tue, 29 Sep 2009 20:14:02 -0400</pubDate>
      <title>Re: Random matrix/normal distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261927#683529</link>
      <author>Doug Hull</author>
      <description>A .^ 2&lt;br&gt;
&lt;br&gt;
This will take your matrix and square it element by element.&lt;br&gt;
&lt;br&gt;
.* is similar.&lt;br&gt;
&lt;br&gt;
Doug&lt;br&gt;
&lt;br&gt;
&quot;Michael Grosswald&quot; &amp;lt;michaelgrosswald@yahoo.co.uk&amp;gt; wrote in message &amp;lt;h9tpd6$bh9$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I'm trying to generate random matrices whose entries are from the normal distribution.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Something like this:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; (1/(sqrt(2*pi)))*exp(-(1+99*rand(5))^2/2)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Isn't going to work because squaring a matrix doesn't square each entry. How can I correct this or am I going about this the wrong way.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I'm still a MATLAB beginner so go easy on me!</description>
    </item>
    <item>
      <pubDate>Tue, 29 Sep 2009 21:20:04 -0400</pubDate>
      <title>Re: Random matrix/normal distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261927#683545</link>
      <author>Michael Grosswald</author>
      <description>Thanks a lot to both of you.</description>
    </item>
    <item>
      <pubDate>Wed, 30 Sep 2009 14:32:19 -0400</pubDate>
      <title>Re: Random matrix/normal distribution</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/261927#683714</link>
      <author>Tom Lane</author>
      <description>&amp;gt; I'm trying to generate random matrices whose entries are from the normal &lt;br&gt;
&amp;gt; distribution.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Something like this:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; (1/(sqrt(2*pi)))*exp(-(1+99*rand(5))^2/2)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Isn't going to work because squaring a matrix doesn't square each entry. &lt;br&gt;
&amp;gt; How can I correct this or am I going about this the wrong way.&lt;br&gt;
&lt;br&gt;
Michael, if you square the matrix, this will give you values of the normal &lt;br&gt;
density function evaluated at random points. I encourage you to try the &lt;br&gt;
advice from dbp instead of squaring the matrix in this formula.&lt;br&gt;
&lt;br&gt;
-- Tom </description>
    </item>
  </channel>
</rss>

