Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

random - Class: piecewisedistribution

Random numbers from piecewise distribution

Syntax

r = random(obj)
R = random(obj,n)
R = random(obj,m,n)
R = random(obj,[m,n])
R = random(obj,m,n,p,...)
R = random(obj,[m,n,p,...])

Description

r = random(obj) generates a pseudo-random number r drawn from the piecewise distribution object obj.

R = random(obj,n) generates an n-by-n matrix of pseudo-random numbers R.

R = random(obj,m,n) or R = random(obj,[m,n]) generates an m-by-n matrix of pseudo-random numbers R.

R = random(obj,m,n,p,...) or R = random(obj,[m,n,p,...]) generates an m-by-n-by-p-by-... array of pseudo-random numbers R.

Examples

Fit Pareto tails to a t distribution at cumulative probabilities 0.1 and 0.9:

t = trnd(3,100,1);
obj = paretotails(t,0.1,0.9);

r = random(obj)
r =
    0.8285

See Also

paretotails, cdf, icdf

  


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