I can find the
random('normal', 0, 1, 10000,1)
command in MATLAB but it generates half-normal variates. I would like to generate random half-normal variates. The half-normal distribution is defined by
$$f_{|Z|}(x)=\frac{2}{\sqrt{2\pi}}e^\frac{-x^{2}}{2}.$$
Can I generate a random half-normal variates from random normal variates?