Path: news.mathworks.com!not-for-mail
From: "Joachim " <a@b.com>
Newsgroups: comp.soft-sys.matlab
Subject: randn algorithm
Date: Mon, 12 May 2008 20:03:03 +0000 (UTC)
Organization: Boston College
Lines: 22
Message-ID: <g0a7pn$mmc$1@fred.mathworks.com>
Reply-To: "Joachim " <a@b.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210622583 23244 172.30.248.37 (12 May 2008 20:03:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 12 May 2008 20:03:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 809818
Xref: news.mathworks.com comp.soft-sys.matlab:467998


Hi,

I currently convert a Matlab simulation code to Fortran and
need to generate normally distributed random numbers in the
process. Unfortunately, the random numbers provided by the
generators I have at my disposal in Fortran seem to have
slightly different properties than the ones generated by
Matlab's "randn"

The question is, which generate in Intel MKL would provide
random numbers most similar to those provided by randn
(which, I take from "doc randn", uses the ziggurat algorithm)?

I am currently using VSL_BRNG_MCG31 as the base generator
and BOXMULLER as the distribution generator. There are a
bunch of different possibilities as for both the base and
the distribution generator, so I am clueless here.

It would be most useful to know if Matlab uses some external
library (and which one) in generating normal random numbers.

Thanks!