MATLAB: How to pick the j-th percentile of a distribution

percentileStatistics and Machine Learning Toolbox

Hi all,
I have some data and I want to pick the j-th percentile of the distribution.
Here an example:
a=2000;
b=300;
c=a+(b)*randn(100,1);
cdfval = fitdist(arg_1, 'normal');
So how can I get the 50° percentile of the distribution, that it is 2000?
thanks

Best Answer

Since you have the Statistics Toolbox, use the prctile function.