Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

exprnd

Exponential random numbers

Syntax

R = exprnd(mu)
R = exprnd(mu,m,n,...)
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,m,n,...) or R = exprnd(mu,[m,n,...]) generates an m-by-n-by-... array containing random numbers from the exponential distribution with mean parameter mu. mu can be a scalar or an array of the same size as 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

Introduced before R2006a

Was this topic helpful?