<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - comments on Post, Simulation of Brownian Motion</title>
    <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 16 Jun 2026 15:18:55 GMT</lastBuildDate>
    <pubDate>Tue, 16 Jun 2026 15:18:55 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest comments added to the Post, Simulation of Brownian Motion</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - comments on Post, Simulation of Brownian Motion</title>
      <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion</link>
    </image>
    <item>
      <title>nice stuff</title>
      <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion?ref=Feed:MaplePrimes:Simulation of Brownian Motion:Comments#comment79307</link>
      <itunes:summary>&lt;pre&gt;
Nice stuff, Alec :-) Especially I like your construct for W ...

The size comes through the plot. How about exporting or saving?
&lt;/pre&gt;</itunes:summary>
      <description>The latest comments added to the Post, Simulation of Brownian Motion</description>
      <guid>79307</guid>
      <pubDate>Sun, 22 Oct 2006 21:28:01 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>Exporting and saving</title>
      <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion?ref=Feed:MaplePrimes:Simulation of Brownian Motion:Comments#comment86288</link>
      <itunes:summary>Axel, 

Thank you.

Exporting to gif worked out OK (except cutting off the labels on the y-axis) - that's how I got the pictures, I didn't do any editing of them later. 

Saving took some time (a few minutes), but seemed OK, too. Perhaps, if I waited longer, the saved file could be opened. I tried to open it only once and waited only for about 3 minutes. 

Later I thought that I could just export all plots to gifs, remove output, and insert pictures from the exported gifs after that. That should make the worksheet considerably smaller. 

Alec</itunes:summary>
      <description>The latest comments added to the Post, Simulation of Brownian Motion</description>
      <guid>86288</guid>
      <pubDate>Sun, 22 Oct 2006 23:32:54 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
    <item>
      <title>Here is a slightly more efficient way to do to the same.</title>
      <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion?ref=Feed:MaplePrimes:Simulation of Brownian Motion:Comments#comment86287</link>
      <itunes:summary>&lt;pre&gt;
BM := proc(n::posint, m::posint)
    local X;

    uses Statistics,ListTools;
    X := RandomVariable(Normal(0,1/sqrt(n)));
    '&amp;lt;0,PartialSums([seq(i,i=Sample(X,n))])[]&amp;gt;'$m;

end proc:

BM2 := proc(n::posint, m::posint)
    local A, i;
    A := ArrayTools:-Alias(Statistics:-Sample(Normal(0, 1/sqrt(n)), m*n), [1..m, 1..n]);
    for i to m do
        A[i] := Statistics:-CumulativeSum(A[i]);
    end do;
    A;
end proc;

&gt; time(BM(200, 200));
                                                                         0.924

&gt; time(BM2(200, 200));
                                                                         0.048

&gt; time(BM2(1000, 1000));
                                                                         0.956

&lt;/pre&gt;

-Alex</itunes:summary>
      <description>The latest comments added to the Post, Simulation of Brownian Motion</description>
      <guid>86287</guid>
      <pubDate>Sun, 22 Oct 2006 23:59:33 Z</pubDate>
      <itunes:author>alex</itunes:author>
      <author>alex</author>
    </item>
    <item>
      <title>Thank you</title>
      <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion?ref=Feed:MaplePrimes:Simulation of Brownian Motion:Comments#comment90883</link>
      <itunes:summary>Alex, 

Thank you. I waited for that. I thought that there should be an effective way of doing that with vectors, without converting them to lists, but couldn't find it. 

Alec</itunes:summary>
      <description>The latest comments added to the Post, Simulation of Brownian Motion</description>
      <guid>90883</guid>
      <pubDate>Mon, 23 Oct 2006 00:15:41 Z</pubDate>
      <itunes:author>Alec Mihailovs</itunes:author>
      <author>Alec Mihailovs</author>
    </item>
    <item>
      <title>what about using hfarray?</title>
      <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion?ref=Feed:MaplePrimes:Simulation of Brownian Motion:Comments#comment79305</link>
      <itunes:summary>&lt;pre&gt;
BM3 := proc(n::posint, m::posint)
  local A, i, CS;
  A := ArrayTools:-Alias(Statistics:-Sample(Normal(0, 1/sqrt(n)), m*n), [1..m, 1..n]);
 
 CS:=proc(L,n)
 local LL, s;
   LL:=hfarray(1..n);
   s:=0;
   for i from 1 to n do
     s:= s + L[i];
     LL[i]:=s;
   end do;
 LL;
 end proc;
 
 #st:=time():
   for i to m do
     A[i] :=CS(A[i],n);
   end do;
 #print( time()-st);
     A;
 #print( A[1]);
 end proc:

gc(): time(tmp=BM1(200, 200));
gc(): time(tmp=BM2(200, 200));
gc(): time(tmp=BM3(200, 200));
                                4.519
                                0.189
                                0.019

gc(): time(tmp=BM2(1000, 1000));
gc(): time(tmp=BM3(1000, 1000));
                                1.780
                                0.334

PS: may be one should clean the sheet, otherwise the (large) arrays are stored with it.

&lt;/pre&gt;</itunes:summary>
      <description>The latest comments added to the Post, Simulation of Brownian Motion</description>
      <guid>79305</guid>
      <pubDate>Mon, 23 Oct 2006 02:32:03 Z</pubDate>
      <itunes:author>Axel Vogt</itunes:author>
      <author>Axel Vogt</author>
    </item>
    <item>
      <title>Excellent idea</title>
      <link>http://www.mapleprimes.com/posts/42391-Simulation-Of-Brownian-Motion?ref=Feed:MaplePrimes:Simulation of Brownian Motion:Comments#comment86285</link>
      <itunes:summary>Axel, 

Excellent idea! Thank you! I'll try to incorporate it and maybe we could submit the worksheet to the Maple Application center, with 4 authors: you, Alex, Stephen Ryder, and me. 

_________
Alec Mihailovs 
&lt;a href="http://mihailovs.com/Alec/"&gt;http://mihailovs.com/Alec/&lt;/a&gt;</itunes:summary>
      <description>The latest comments added to the Post, Simulation of Brownian Motion</description>
      <guid>86285</guid>
      <pubDate>Mon, 23 Oct 2006 05:00:23 Z</pubDate>
      <itunes:author>alec</itunes:author>
      <author>alec</author>
    </item>
  </channel>
</rss>