<< distfun_unifrnd Uniform

Distribution Functions >> 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 1x1 or nxm matrix of doubles, the lower bound

b :

a 1x1 or nxm matrix of doubles, the upper bound

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 = [4.    5.    6.    7.    8.    9.];
ve = [3.    3.    3.    3.    3.    3.];

Authors

<< distfun_unifrnd Uniform