Statistics Toolbox | ![]() ![]() |
Continuous uniform probability density function (pdf)
Syntax
Description
Y = unifpdf(X,A,B)
computes the continuous uniform pdf at each of the values in X
using the corresponding parameters in A and B. Vector or matrix inputs for X, A, and B must all have the same size. A scalar input is expanded to a constant matrix with the same dimensions as the other inputs. The parameters in B must be greater than those in A.
The continuous uniform distribution pdf is
The standard uniform distribution has A = 0
and B = 1
.
Examples
For fixed a
and b
, the uniform pdf is constant.
What if x
is not between a
and b
?
See Also
pdf
, unifcdf
, unifinv
, unifrnd
, unifstat
![]() | unifit | unifrnd | ![]() |