Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

raylpdf

Rayleigh probability density function

Syntax

Y = raylpdf(X,B)

Description

Y = raylpdf(X,B) computes the Rayleigh pdf at each of the values in X using the corresponding scale parameter, B. X and B can be vectors, matrices, or multidimensional arrays that all have the same size, which is also the size of Y. A scalar input for X or B is expanded to a constant array with the same dimensions as the other input.

The Rayleigh pdf is

y=f(x|b)=xb2e(x22b2)

Examples

collapse all

Compute the pdf of a Rayleigh distribution with parameter B = 0.5.

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

Plot the pdf.

figure;
plot(x,p)

Extended Capabilities

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

Introduced before R2006a

Was this topic helpful?