Categories &

Functions List

Function Reference: raylcdf

statistics: p = raylcdf (x, sigma)
statistics: p = raylcdf (x, sigma, "upper")

Rayleigh cumulative distribution function (CDF).

For each element of x, compute the cumulative distribution function (CDF) of the Rayleigh distribution with scale parameter sigma. The size of p is the common size of x and sigma. A scalar input functions as a constant matrix of the same size as the other inputs.

p = raylcdf (x, sigma, "upper") computes the upper tail probability of the Rayleigh distribution with parameter sigma, at the values in x.

Further information about the Rayleigh distribution can be found at https://en.wikipedia.org/wiki/Rayleigh_distribution

See also: raylinv, raylpdf, raylrnd, raylfit, rayllike, raylstat

Source Code: raylcdf

Example: 1

 

 ## Plot various CDFs from the Rayleigh distribution
 x = 0:0.01:10;
 p1 = raylcdf (x, 0.5);
 p2 = raylcdf (x, 1);
 p3 = raylcdf (x, 2);
 p4 = raylcdf (x, 3);
 p5 = raylcdf (x, 4);
 plot (x, p1, "-b", x, p2, "g", x, p3, "-r", x, p4, "-m", x, p5, "-k")
 grid on
 ylim ([0, 1])
 legend ({"σ = 0.5", "σ = 1", "σ = 2", ...
          "σ = 3", "σ = 4"}, "location", "southeast")
 title ("Rayleigh CDF")
 xlabel ("values in x")
 ylabel ("probability")

                    
plotted figure