raylpdf
statistics: y = raylpdf (x, sigma)
Rayleigh probability density function (PDF).
For each element of x, compute the probability density function (PDF) 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.
Further information about the Rayleigh distribution can be found at https://en.wikipedia.org/wiki/Rayleigh_distribution
See also: raylcdf, raylinv, raylrnd, raylfit, rayllike, raylstat
Source Code: raylpdf
Plot various PDFs from the Rayleigh distribution
x = 0:0.01:10;
y1 = raylpdf (x, 0.5);
y2 = raylpdf (x, 1);
y3 = raylpdf (x, 2);
y4 = raylpdf (x, 3);
y5 = raylpdf (x, 4);
plot (x, y1, '-b', x, y2, 'g', x, y3, '-r', x, y4, '-m', x, y5, '-k')
grid on
ylim ([0, 1.25])
legend ({'σ = 0,5', 'σ = 1', 'σ = 2', ...
'σ = 3', 'σ = 4'}, 'location', 'northeast')
title ('Rayleigh PDF')
xlabel ('values in x')
ylabel ('density')