Hauptinhalt

raylstat

Rayleigh mean and variance

Description

m = raylstat(b) returns the mean for the Rayleigh distribution with the scale parameter b.

[m,v] = raylstat(b) also returns the variance for the distribution.

example

Examples

collapse all

Compute the mean and variance of a Rayleigh distribution with the scale parameter b.

b = 2;
[mean,variance] = raylstat(b)
mean = 
2.5066
variance = 
1.7168

Input Arguments

collapse all

Scale parameter, specified as a positive scalar value or an array of positive scalar values.

Data Types: single | double

Output Arguments

collapse all

Mean for the Rayleigh distribution, returned as a numeric scalar or an array of numeric scalars. m is the same size as b. Each element in m is the mean of the Rayleigh distribution specified by the corresponding element in b.

The mean of the Rayleigh distribution is

bπ/2

Variance for the Rayleigh distribution, returned as a numeric scalar or an array of numeric scalars. v is the same size as b. Each element in v is the variance of the Rayleigh distribution specified by the corresponding element in b.

The variance of the Rayleigh distribution is

4π2b2

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced before R2006a