Integration of incomplete beta function
Mostra commenti meno recenti
This code works: g=integral(@(z)(z.^(2*0.1*0.7-1)).*betainc(0.7./z,0.37,0.4),0.7,0.7*exp(10/0.7),'RelTol',1e-16)
but if I change the upper limit of the integral from 0.7*exp(10/0.7) to 0.7*exp(12/0.7) I get the following error:
Error using betainc X must be in the interval [0,1].
Error in @(z)(z.^(2*0.1*0.7-1)).*betainc(0.7./z,0.37,0.4)
Error in integralCalc/iterateScalarValued (line 323) fx = FUN(t).*w;
Error in integralCalc/vadapt (line 132) [q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
Error in integralCalc (line 75) [q,errbnd] = vadapt(@AtoBInvTransform,interval);
Error in integral (line 88) Q = integralCalc(fun,a,b,opstruct);
for other values like 0.7*exp(30/0.7) i get error as well but not with others as 0.7*exp(100/0.7)
could anyone give some clue why this erratic behaviour of the integral? X should always between [0,1]. Thank you beforehand.
Risposte (1)
Torsten
il 13 Nov 2014
0 voti
Check whether the error remains if you replace
betainc(0.7./z,0.37,0.4)
by
betainc(min(1,0.7./z),0.37,0.4)
Best wishes
Torsten.
Categorie
Scopri di più su Special Functions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!