본문 바로가기

Enginius/Matlab

normrnd (White Gaussian Noise sampling)

normrnd -Normal random numbers

Syntax

R = normrnd(mu,sigma)
R = normrnd(mu,sigma,m,n,...)
R = normrnd(mu,sigma,[m,n,...])

Description

R = normrnd(mu,sigma) generates random numbers from the normal distribution with mean parameter mu and standard deviation parameter sigmamuand sigma can be vectors, matrices, or multidimensional arrays that have the same size, which is also the size of R. A scalar input for mu or sigma is expanded to a constant array with the same dimensions as the other input.

R = normrnd(mu,sigma,m,n,...) or R = normrnd(mu,sigma,[m,n,...]) generates an m-by-n-by-... array. The musigma parameters can each be scalars or arrays of the same size as R.

Examples

n1 = normrnd(1:6,1./(1:6))
n1 =
  2.1650  2.3134  3.0250  4.0879  4.8607  6.2827

n2 = normrnd(0,1,[1 5])
n2 =
  0.0591  1.7971  0.2641  0.8717  -1.4462

n3 = normrnd([1 2 3;4 5 6],0.1,2,3)
n3 =
  0.9299  1.9361  2.9640
  4.1246  5.0577  5.9864

See Also

lognrnd | mvnrnd | normcdf | normfit | norminv | normlike | normpdf | normstat | random

How To

'Enginius > Matlab' 카테고리의 다른 글

clear all / close all / clc / clf  (2) 2011.10.25
for loop  (0) 2011.10.25
plot  (0) 2011.10.13
classify, knnclassify  (0) 2011.10.13
HMM(Hidden Markov Models)  (0) 2011.10.12