MATLAB Answers

how to write *normrnd* by myself?

3 views (last 30 days)
I want to write normrnd 's code by myself but I have no idea about it. thanks for help


Sign in to comment.

Accepted Answer

Matt J
Matt J on 16 Feb 2016
Edited: Matt J on 16 Feb 2016
Just use
and choose A and B appropriate to the sigma, mu that you want.


Show 2 older comments
alireza kooshafar
alireza kooshafar on 16 Feb 2016
thanks ,excuse me can I write randn 's code just by using rand too?
Matt J
Matt J on 16 Feb 2016
I can't see how you would do that, except by using a Central Limit Theorem approximation.

Sign in to comment.

More Answers (0)



Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by