The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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: 18,038
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" <> 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 at NCTM 1994-2018. All Rights Reserved.