Inverse CDF for Scaled Normal Distribution
Afficher commentaires plus anciens
I have a cumulative distribution function of the form:

This CDF can easily be written in MATLAB using the normcdf command as:
F = @(x) normcdf((a*x-b)/g(x),0,1);
I want to create a function handle for the inverse CDF (ICDF). If a=1 and g(x) is a constant, then the ICDF can simply be written as:
F_inv = @(Pr) norminv(Pr,b,g(x));
However neither of these conditions apply for me. One solution for creating a function handle for the ICDF is to invert F using the fzero() function:
F_inv = @(Pr) fzero(@(x) F(x)-Pr,x0); % x0 is an interval (a guess) where F(x)-Pr crosses the line y=0.
This however seems clunky and wont work if the guess for x0 does not contain the crossing point...is there a better way to do this?
Réponses (0)
Catégories
En savoir plus sur Interpolation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!