Main Content

raylinv

Rayleigh inverse cumulative distribution function

Description

x = raylinv(p,b) returns the inverse cumulative distribution function (icdf) of the Rayleigh distribution with the scale parameter b, evaluated at the probability values in p.

example

Examples

collapse all

Compute the inverse cdf (icdf) values evaluated at the probability values in p for the Rayleigh distribution with the scale parameter b.

p = 0.005:0.01:0.995;
b = 2;
x = raylinv(p,b);

Plot the icdf.

plot(p,x)
grid on
xlabel("p");
ylabel("x");

Figure contains an axes object. The axes object with xlabel p, ylabel x contains an object of type line.

Input Arguments

collapse all

Probability values at which to evaluate the icdf, specified as a scalar value or an array of scalar values in the range [0,1].

To evaluate the icdf at multiple values, specify p as an array. To evaluate the icdfs of multiple distributions, specify b as an array. If both p and b are arrays, they must have the same size. If either p or b is a scalar, raylinv expands the scalar input argument into a constant array of the same size as the other input argument. Each element in x is the icdf value of the distribution specified by the corresponding element in b, evaluated at the corresponding element in p.

Data Types: single | double

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

To evaluate the icdf at multiple values, specify p as an array. To evaluate the icdfs of multiple distributions, specify b as an array. If both p and b are arrays, they must have the same size. If either p or b is a scalar, raylinv expands the scalar input argument into a constant array of the same size as the other input argument. Each element in x is the icdf value of the distribution specified by the corresponding element in b, evaluated at the corresponding element in p.

Data Types: single | double

Output Arguments

collapse all

Inverse cdf values evaluated at the probabilities in p, returned as a scalar value or an array of scalar values. x is the same size as p and b after any necessary scalar expansion. Each element in x is the icdf value of the distribution specified by the corresponding element in b, evaluated at the corresponding element in p.

Alternative Functionality

  • raylinv is a function specific to the Rayleigh distribution. Statistics and Machine Learning Toolbox™ also offers the generic function icdf, which supports various probability distributions. To use icdf, create a RayleighDistribution probability distribution object and pass the object as an input argument or specify the probability distribution name and its parameters. Note that the distribution-specific function raylinv is faster than the generic function icdf.

Extended Capabilities

expand all

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

Version History

Introduced before R2006a