Mercurial > octave-nkf
diff scripts/specfun/erfinv.m @ 4844:9f7ef92b50b0
[project @ 2004-04-02 17:26:53 by jwe]
author | jwe |
---|---|
date | Fri, 02 Apr 2004 17:26:54 +0000 |
parents | b5267e631ba8 |
children | c08cb1098afc |
line wrap: on
line diff
--- a/scripts/specfun/erfinv.m Fri Apr 02 14:54:20 2004 +0000 +++ b/scripts/specfun/erfinv.m Fri Apr 02 17:26:54 2004 +0000 @@ -38,9 +38,11 @@ iterations = 0; - [m, n] = size (x); - x = reshape (x, m * n, 1); - y = zeros (m * n, 1); + sz = size (x); + nel = numel (x); + + x = reshape (x, nel, 1); + y = zeros (nel, 1); i = find ((x < -1) | (x > 1) | isnan(x)); if any (i) @@ -69,6 +71,6 @@ y(i) = z_new; endif - y = reshape (y, m, n); + y = reshape (y, sz); endfunction