<< distfun_unifrnd Uniform Random Number Generator >>

Distfun >> Distfun > Uniform > distfun_unifstat

distfun_unifstat

Uniform mean and variance

Calling Sequence

M = distfun_unifstat ( a , b )
[M,V] = distfun_unifstat ( a , b )

Parameters

a :

a matrix of doubles, the lower bound

b :

a matrix of doubles, the upper bound (with a<=b)

M :

a matrix of doubles, the mean

V :

a matrix of doubles, the variance

Description

Computes statistics from the Uniform distribution.

The mean and variance of the Uniform distribution are

Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.

Examples

a = 1:6;
b = 2:7;
[M,V] = distfun_unifstat ( a , b )
me = [1.5    2.5    3.5    4.5    5.5    6.5];
ve = [0.0833333    0.0833333    0.0833333    0.0833333    0.0833333    0.0833333];

Authors


Report an issue
<< distfun_unifrnd Uniform Random Number Generator >>