Accelerating the pace of engineering and science

# raylcdf

Rayleigh cumulative distribution function

## Syntax

p = raylcdf(x,b)
p = raylcdf(x,b,'upper')

## Description

p = raylcdf(x,b) returns the Rayleigh cdf at each value in x using the corresponding scale parameter, b. x and b can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input for x or b is expanded to a constant array with the same dimensions as the other input.

p = raylcdf(x,b,'upper') returns the complement of the Rayleigh cdf at each value in x, using an algorithm that more accurately computes the extreme upper tail probabilities.

The Rayleigh cdf is

$y=F\left(x|b\right)={\int }_{0}^{x}\frac{t}{{b}^{2}}{e}^{\left(\frac{-{t}^{2}}{2{b}^{2}}\right)}dt$

## Examples

expand all

### Compute and Plot Rayleigh Distribution cdf

Compute the cdf of a Rayleigh distribution with parameter B = 1.

```x = 0:0.1:3;
p = raylcdf(x,1);
```

Plot the cdf.

```figure;
plot(x,p)
```
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 1, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9040365815162659, "perplexity": 1871.0293611500008}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2014-52/segments/1418802770815.118/warc/CC-MAIN-20141217075250-00113-ip-10-231-17-201.ec2.internal.warc.gz"}