stdrpdf
statistics: y = stdrpdf (x, k, df)
Studentized range probability density function (PDF).
For each element of x, compute the probability density function (PDF) of the studentized range distribution for k groups and df degrees of freedom. The size of y is the common size of x, k and df. A scalar input functions as a constant matrix of the same size as the other inputs.
k must be an integer of at least 2 and df positive, Inf
included; otherwise y is NaN. The density is zero for
negative x and, for k greater than 2, at zero.
MATLAB has no public counterpart of this function.
Further information about the studentized range distribution can be found at https://en.wikipedia.org/wiki/Studentized_range_distribution
Input arguments must be double or single; integer, logical,
and character arrays are rejected.
See also: stdrcdf, stdrinv, stdrrnd, stdrstat
Source Code: stdrpdf
Plot various PDFs from the studentized range distribution
x = 0:0.01:8;
y1 = stdrpdf (x, 2, 5);
y2 = stdrpdf (x, 3, 5);
y3 = stdrpdf (x, 5, 5);
y4 = stdrpdf (x, 5, Inf);
plot (x, y1, '-b', x, y2, '-g', x, y3, '-r', x, y4, '-m')
grid on
legend ({'k = 2, df = 5', 'k = 3, df = 5', 'k = 5, df = 5', ...
'k = 5, df = \infty'}, 'location', 'northeast')
title ('Studentized range PDF')
xlabel ('values in x')
ylabel ('density')