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 !

 채택된 답변

Torsten
Torsten 2022년 6월 21일
편집: Torsten 2022년 6월 21일
p = 0.3;
mu = 1/4;
x = -mu.*log(1-p)
x = 0.0892
x2 = expinv(p,mu)
x2 = 0.0892

추가 답변 (0개)

카테고리

제품

릴리스

R2022a

질문:

2022년 6월 21일

댓글:

2022년 6월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by