Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: random numbers in parallel
Replies: 3   Last Post: Apr 26, 2013 1:12 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,945
Registered: 12/7/04
Re: random numbers in parallel
Posted: Apr 26, 2013 1:12 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Gideon" <gideon.simpson@gmail.com> wrote in message
> Thanks Patrick.

Peter is the one to whom you responded.

> It sounds like I am in the "easy" case. The code I have is of the
> following form:
> data = zeros(N,1);
> parfor k = 1:N
> xi = randn(M,1);
> data(k) = f(xi);
> end
> In other words, I want N realizations of a certain function f which
> depends on having M i.i.d. Gaussian random variables. So all I want here
> is to ensure that each worker is getting an independent stream of random
> numbers when it goes on to use randn.

You might find this section of the documentation interesting and/or


Steve Lord
To contact Technical Support use the Contact Us link on

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.