unifpdf

Compute uniform distribution probability density function values.

Syntax

d=unifpdf(x)

d=unifpdf(x,a,b)

Inputs

x
Values of the distribution random variable.
Type: double
Dimension: scalar | vector | matrix
a
Lower bound (default = 0).
Type: double
Dimension: scalar | vector | matrix
b
Upper bound (default = 1).
Type: double
Dimension: scalar | vector | matrix

Outputs

d
Probability density values.

Examples

Single value unifpdf example:
x = 4;
a = 3;
b = 5;
d = unifpdf(x,a,b)
d = 0.5
Vector unifpdf example:
x = [3.2:0.4:4.8];
a = 3;
b = 5;
d = unifpdf(x,a,b)
d = [Matrix] 1 x 5
0.5 0.5 0.5 0.5 0.5