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.

random

Class: ProbDist

Generate random number drawn from ProbDist object

Syntax

Y = random(PD)
Y = random(PD, N)
Y = random(PD, N, M, ...)

Description

Y = random(PD) generates a random number drawn from the distribution specified by PD, a ProbDist object.

Y = random(PD, N) generates an N-by-N array of random numbers drawn from the distribution specified by PD, a ProbDist object.

Y = random(PD, N, M, ...) generates an N-by-M-by... array of random numbers drawn from the distribution specified by PD, a ProbDist object.

Input Arguments

PDAn object of the class ProbDistUnivParam or ProbDistUnivKernel.
NA positive integer.
MA positive integer.

Output Arguments

YA random number drawn from the distribution specified by PD.

See Also

Was this topic helpful?