There exists, logspace, linspace, what about probability space?

Hi guys,
I want to create a set from [0,1] that's equally spaced in a probability plot such as for Probability of Detection vs Probability of False Alarm graphs.
logspace is sort of what I want but not exactly.
Is there a function for "probspace"?
Thanks, William

Respuestas (2)

No. But you can use fsolve() or the like to solve the cdf for particular values.
probspace = @(CDF, XMin, XMax, N) arrayfun( @(p) fsolve( @(x) CDF(x)-p, [Xmin, XMax]), linspace(0,1,N) );
XMin and XMax are required because probability functions vary in the range they are defined over.
CDF should be the function handle of the cumulative distribution function for the probability distribution you are interested in.
You haven't said what probability distribution you want. If it's the standard normal distribution, you could try
norminv(.1:.1:.9) % if you have the Statistics Toolbox
sqrt(2)*erfcinv(2*(.1:.1:.9)) % if you do not
This will give you values that are equally space on the probability scale, but are not themselves between 0 and 1.

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Preguntada:

el 31 de Oct. de 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by