gammai->gammainc

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

gammai->gammainc

Paul Kienzle-2

Paul Kienzle <[hidden email]>

        * statistics/distributions/gamma_cdf.m: replace gammai with gammainc
        * statistics/distributions/poisson_cdf.m: Likewise.

Index: statistics/distributions/gamma_cdf.m
===================================================================
RCS file: /cvs/octave/scripts/statistics/distributions/gamma_cdf.m,v
retrieving revision 1.4
diff -c -r1.4 gamma_cdf.m
*** statistics/distributions/gamma_cdf.m 2002/05/01 06:48:35 1.4
--- statistics/distributions/gamma_cdf.m 2002/08/09 19:25:26
***************
*** 52,58 ****
 
    k = find ((x > 0) & (a > 0) & (b > 0));
    if (any (k))
!     cdf (k) = gammai (a(k), b(k) .* x(k));
    endif
 
    cdf = reshape (cdf, r, c);
--- 52,58 ----
 
    k = find ((x > 0) & (a > 0) & (b > 0));
    if (any (k))
!     cdf (k) = gammainc (b(k) .* x(k), a(k));
    endif
 
    cdf = reshape (cdf, r, c);
Index: statistics/distributions/poisson_cdf.m
===================================================================
RCS file: /cvs/octave/scripts/statistics/distributions/poisson_cdf.m,v
retrieving revision 1.5
diff -c -r1.5 poisson_cdf.m
*** statistics/distributions/poisson_cdf.m 2002/05/01 06:48:36 1.5
--- statistics/distributions/poisson_cdf.m 2002/08/09 19:25:26
***************
*** 56,62 ****
 
    k = find ((x >= 0) & (x < Inf) & (l > 0));
    if (any (k))
!     cdf(k) = 1 - gammai (floor (x(k)) + 1, l(k));
    endif
 
    cdf = reshape (cdf, r, c);
--- 56,62 ----
 
    k = find ((x >= 0) & (x < Inf) & (l > 0));
    if (any (k))
!     cdf(k) = 1 - gammainc (l(k), floor (x(k)) + 1);
    endif
 
    cdf = reshape (cdf, r, c);


Reply | Threaded
Open this post in threaded view
|

gammai->gammainc

John W. Eaton-6
On  9-Aug-2002, Paul Kienzle <[hidden email]> wrote:

| Paul Kienzle <[hidden email]>
|
| * statistics/distributions/gamma_cdf.m: replace gammai with gammainc
| * statistics/distributions/poisson_cdf.m: Likewise.

I applied this patch.

Thanks,

jwe