Main Content

raylpdf

Rayleigh probability density function

Syntax

Y = raylpdf(X,B)

Description

Y = raylpdf(X,B)计算瑞利pdfeach of the values inXusing the corresponding scale parameter,B.XandBcan be vectors, matrices, or multidimensional arrays that all have the same size, which is also the size ofY. A scalar input forXorBis expanded to a constant array with the same dimensions as the other input.

The Rayleigh pdf is

y = f ( x | b ) = x b 2 e ( x 2 2 b 2 )

Examples

collapse all

Compute the pdf of a Rayleigh distribution with parameterB = 0.5.

x = [0:0.01:2]; p = raylpdf(x,0.5);

Plot the pdf.

figure; plot(x,p)

Figure contains an axes object. The axes object contains an object of type line.

Extended Capabilities

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

Version History

Introduced before R2006a