There exists, logspace, linspace, what about probability space?
7 views (last 30 days)
Show older comments
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
0 Comments
Answers (2)
Walter Roberson
on 31 Oct 2012
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.
0 Comments
Tom Lane
on 1 Nov 2012
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.
0 Comments
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!