Products & Services Industries Academia Support User Community Company

Learn more about Statistics Toolbox   

exprnd - Exponential random numbers

Syntax

R = exprnd(mu)
R = exprnd(mu,v)
R = exprnd(mu,m,n)

Description

R = exprnd(mu) generates random numbers from the exponential distribution with mean parameter mu. mu can be a vector, a matrix, or a multidimensional array. The size of R is the size of mu.

R = exprnd(mu,v) generates an array R of size v containing random numbers from the exponential distribution with mean mu, where v is a row vector. If v is a 1-by-2 vector, R is a matrix with v(1) rows and v(2) columns. If v is 1-by-n, R is an n-dimensional array.

R = exprnd(mu,m,n) generates random numbers from the exponential distribution with mean parameter mu, where scalars m and n are the row and column dimensions of R.

Examples

n1 = exprnd(5:10)
n1 =
  7.5943  18.3400  2.7113  3.0936  0.6078  9.5841

n2 = exprnd(5:10,[1 6])
n2 =
  3.2752  1.1110  23.5530  23.4303  5.7190  3.9876

n3 = exprnd(5,2,3)
n3 =
  24.3339  13.5271  1.8788
   4.7932   4.3675  2.6468

See Also

expcdf | expfit | expinv | explike | exppdf | expstat | random

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS