[Scilab-Dev] Incomplete Gamma function

calixte calixte.denizet at ac-rennes.fr
Thu Jul 29 18:58:47 CEST 2010


Hello Mathieu,

gammainc(x,y) is equivalent to 1-cdfpoi("PQ",y-1,x) or gammainc(x,y)=Q
where Q is obtained with [P,Q]=cdfpoi("PQ",y-1,x).
Since cdfpoi is a built-in function, the performances are better :

-->tic();for i=1:1000;gammainc(3.1,4.2);end;toc()
 ans  =
 
    1.144  
 
-->tic();for i=1:1000;1-cdfpoi("PQ",3.2,3.1);end;toc()
 ans  =
 
    0.017

Best regards,

Calixte

Le jeudi 29 juillet 2010 à 01:37 +0200, OLIVIER Mathieu a écrit :
> Hi,
> 
> I needed the Incomplete Gamma function, as it was not available in 
> Scilab, I've developed my own one, based onto the NUMERICAL RECIPES.
> 
> This functions works and gives sames results than the one from MATLAB 
> (with my own tests).
> 
> So I would like to submit this function, perhaps this one could be added 
> in a future version of Scilab or help to made a "Scilab version".
> 
> Regards
> 
> Mathieu OLIVIER
> 





More information about the dev mailing list