Workaround for the expinv function in statistics toolbox

Hi,
I have been working with the norminv function for a while using my own code as follow:
function z = norminv(p,sigma,mu)
z = sigma.*(-sqrt(2)*erfcinv(2*p))+mu;
end
However, I would like now to use the expinv function but I don't have access to the statistics toolbox. I was wondering if there is a way to work around using that particular function ?
Thanks !

 采纳的回答

p = 0.3;
mu = 1/4;
x = -mu.*log(1-p)
x = 0.0892
x2 = expinv(p,mu)
x2 = 0.0892

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 MATLAB 的更多信息

产品

版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by