Mercurial > hg > octave-nkf
changeset 20465:507ccf8f10ed stable
ellipke.m: Modify to accept row vectors (bug #45283).
* ellipke.m: Don't reshape input m to a column vector.
author | Michele Zaffalon <michele.zaffalon@bruker.com> |
---|---|
date | Tue, 09 Jun 2015 21:42:10 -0700 |
parents | 7fa170cc14fe |
children | 7ab81a9fa065 |
files | scripts/specfun/ellipke.m |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/specfun/ellipke.m +++ b/scripts/specfun/ellipke.m @@ -94,7 +94,6 @@ endif sz = size (m); - m = m(:); if (! isreal (m)) error ("ellipke: M must be real"); elseif (any (m > 1)) @@ -127,8 +126,8 @@ mult_k = 1./sqrt (1 - m(idx_neg)); mult_e = sqrt (1 - m(idx_neg)); m(idx_neg) = -m(idx_neg) ./ (1 - m(idx_neg)); - a = ones (sum (idx), 1); b = sqrt (1 - m(idx)); + a = ones (size (b)); c = sqrt (m(idx)); f = 0.5; sum = f*c.^2;