Читать книгу Applied Numerical Methods Using MATLAB - Won Y. Yang - Страница 22
1.1.8 Random Number Generators
ОглавлениеMATLAB has the built‐in functions, ‘ rand()
’/‘ randn()
’, to generate random numbers having uniform/normal(Gaussian) distributions, respectively [K-2, Chapter 22].
rand(M,N): Generates an M×N matrix consisting of uniformly distributed random numbers randn(M,N): Generates an M×N matrix consisting of normally distributed random numbers