Integration of norminv function

2 ビュー (過去 30 日間)
Mariia Vasileva
Mariia Vasileva 2017 年 4 月 25 日
コメント済み: Mariia Vasileva 2017 年 4 月 28 日
Is there any way to integrate norminv function for big number of dimensions?
For example in case of 3-dimensional integration integration:
fun3=@(x,y,z) exp(-norminv(x,0,1)).*(abs(sin(norminv(y,0,1)))+abs(sin(norminv(z,0,1)))+abs(sin(norminv(x,0,1))));
q3 = integral3(fun3,0,1,0,1,0,1);
vpa(q3)
Matlab returns the following warnings:
Warning: Reached the maximum number of function evaluations (10000). The result passes the global error test.
> In integral2Calc>integral2t (line 136)
In integral2Calc (line 9)
In integral3/innerintegral (line 146)
In integralCalc/iterateScalarValued (line 314)
In integralCalc/vadapt (line 132)
In integralCalc (line 75)
In integral3 (line 121)
In ICDFd (line 20)
Can somebody please give me an advise?

採用された回答

Andrew Newell
Andrew Newell 2017 年 4 月 25 日
編集済み: Andrew Newell 2017 年 4 月 25 日
The problem is that norminv(x,0,1) goes to -Inf as x goes to zero and Inf as x goes to 1 (and ditto for y and z), so it's hard to integrate accurately. If you can manage with a larger tolerance,
q3 = integral3(fun3,0,1,0,1,0,1,'AbsTol',1e-3);
does not return any warnings (the default tolerance is 1e-10). If you need higher precision, you'll just need to be patient, as the warnings are not fatal. However, I don't know if the precision is actually met under such circumstances.
  3 件のコメント
Andrew Newell
Andrew Newell 2017 年 4 月 27 日
編集済み: Andrew Newell 2017 年 4 月 27 日
The source of the error is your attempt to use norminv with symbolic variables. This gives the same errors:
syms a
norminv(a,0,1)
Trying to come up with your own substitute for integral3 is tricky, and probably not worth the effort as integral3 will almost certainly do a better job.
Mariia Vasileva
Mariia Vasileva 2017 年 4 月 28 日
Yes, but I have problems with multidimensional (greater than 3) integrals...

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

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by