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 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 distribution-specific functions can accept parameters of multiple uniform distributions.

• Use generic distribution functions (`cdf`, `icdf`, `pdf`, `random`) with a specified distribution name (`'Uniform'`) and parameters.

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

## Objects

 `UniformDistribution` Uniform probability distribution object

## Apps

 Probability Distribution Function Interactive density and distribution plots

## Functions

expand all

#### Create `UniformDistribution` Object

 `makedist` Create probability distribution object

#### Work with `UniformDistribution` Object

 `cdf` Cumulative distribution function `icdf` Inverse cumulative distribution function `iqr` Interquartile range `mean` Mean of probability distribution `median` Median of probability distribution `pdf` Probability density function `random` Random numbers `std` Standard deviation of probability distribution `truncate` Truncate probability distribution object `var` Variance of probability distribution
 `rand` Uniformly distributed random numbers `unifcdf` Continuous uniform cumulative distribution function `unifpdf` Continuous uniform probability density function `unifinv` Continuous uniform inverse cumulative distribution function `unifit` Continuous uniform parameter estimates `unifstat` Continuous uniform mean and variance `unifrnd` Continuous uniform random numbers
 `mle` Maximum likelihood estimates
 `disttool` Interactive density and distribution plots `qqplot` Quantile-quantile plot `randtool` Interactive random number generation

## Topics

Uniform Distribution (Continuous)

The uniform distribution (also called the rectangular distribution) is notable because it has a constant probability distribution function between its two bounding parameters.

Generate Random Numbers Using Uniform Distribution Inversion

This example shows how to generate random numbers using the uniform distribution inversion method.

Download ebook