NB. A generator of random numbers from a standard normal distribution
gauss=. 3 : '+/(?-?)0$~6,y'
gauss 5
1.44394 _0.23159 0.150841 0.499904 1.16614
Den 18:26 onsdag den 11. januar 2017 skrev Brian Schott
<[email protected]>:
Your example has 0 valued off-diagonal elements in sq, so there is no
covariance and 2 independent gaussians can be used.
But it your sg had non-zero off-diagonals then according to a very old
reference, if you can find lower triangular matrix c such that sg -: c+/ .
*|:c then you can generate X=(c+/ . *Z)+mu where Z are standard normal and
your desired result is X .
I am assuming you have access to a standard normal random generator. One,
which I have not used is the verb normalrandom in stats/base/random.ijs .
--
(B=) <-----my sig
Brian Schott
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm