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

답변 (2개)

Walter Roberson
Walter Roberson 2012년 10월 31일
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.
Tom Lane
Tom Lane 2012년 11월 1일
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.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2012년 10월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by