Workaround for the expinv function in statistics toolbox

3 ビュー (過去 30 日間)
Ciprien
Ciprien 2022 年 6 月 21 日
コメント済み: Ciprien 2022 年 6 月 21 日
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
  1 件のコメント
Ciprien
Ciprien 2022 年 6 月 21 日
Works just fine ! Thanks a lot

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

その他の回答 (0 件)

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by