I'm trying to read a Matlab script and can't figure out what does randn generate here:
Is it a random real number from (0, 1)?
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.
Documentation from Matlab R2012a
It will generate a number $x$ such that $x$ follows $N(0,1^2)$
My Box-Muller Implementation
|show 2 more comments|
Googling "Matlab randn" gives, as a first result, this Matlab documentation. The first example there says:
In your case then you are generating numbers with a mean of 0 and a standard deviation of 0.1, as you have b = 0 + 0.1 * randn(100,1).
In fairness, finding this through Google isn't hard.
|show 3 more comments|