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 日

0 投票

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

1 件のコメント

Ciprien
Ciprien 2022 年 6 月 21 日
Works just fine ! Thanks a lot

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

リリース

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