Main Content

Uniform Distribution (Continuous)

Evaluate and generate random samples from continuous uniform distribution

Statistics and Machine Learning Toolbox™ offers several ways to work with the continuous uniform distribution.

  • Create a probability distribution object UniformDistribution by specifying parameter values. Then, use object functions to evaluate the distribution, generate random numbers, and so on.

  • Use distribution-specific functions with specified distribution parameters. The functions can accept parameters of multiple uniform distributions.

  • Use the generic distribution functions with the specified distribution name "Uniform" and corresponding parameters.

To learn about the uniform distribution, see Uniform Distribution (Continuous).


UniformDistributionUniform probability distribution object


Probability Distribution FunctionInteractive density and distribution plots


expand all

Create UniformDistribution Object

makedistCreate probability distribution object

Work with UniformDistribution Object

cdfCumulative distribution function
icdfInverse cumulative distribution function
iqrInterquartile range of probability distribution
meanMean of probability distribution
medianMedian of probability distribution
pdfProbability density function
plotPlot probability distribution object (Since R2022b)
randomRandom numbers
stdStandard deviation of probability distribution
truncateTruncate probability distribution object
varVariance of probability distribution
randUniformly distributed random numbers
unifcdfContinuous uniform cumulative distribution function
unifpdfContinuous uniform probability density function
unifinvContinuous uniform inverse cumulative distribution function
unifitContinuous uniform parameter estimates
unifstatContinuous uniform mean and variance
unifrndContinuous uniform random numbers
cdfCumulative distribution function
icdfInverse cumulative distribution function
pdfProbability density function
randomRandom numbers
mleMaximum likelihood estimates
disttoolInteractive density and distribution plots
plotPlot probability distribution object (Since R2022b)
qqplotQuantile-quantile plot
randtoolInteractive random number generation