Hi,
I noticed some oddities in the way the function ellipke from the
specfun package handles vector input. For example,
ellipke([.1; .2])
completes successfully, whereas the following fails:
ellipke([.1 .2])
I've modified ellipke.m to make both of the above work (patch
below). If you wish, I can apply the patch to the Octave-Forge
SourceForge repository myself, however, I don't currently have
developer access. My SourceForge username is konu.
Best,
Kristjan
--- octave/ellipke.m 2008-05-05 13:36:05.000000000 -0500
+++ local/src/specfun-1.0.6/inst/ellipke.m 2008-04-28 12:08:47.000000000
-0500
@@ -46,6 +46,7 @@
endif
k = e = zeros(size(m));
+ m = m(:);
if any(~isreal(m))
error("ellipke must have real m");
endif
@@ -75,10 +76,8 @@
mult_e = sqrt(1-m(idx_neg));
m(idx_neg) = -m(idx_neg)./(1-m(idx_neg));
a = ones(length(idx),1);
- b = NaN(length(idx),1);
- b(:,1) = sqrt(1.0-m(idx));
- c = NaN(length(idx),1);
- c(:,1) = sqrt(m(idx));
+ b = sqrt(1.0-m(idx));
+ c = sqrt(m(idx));
f = 0.5;
sum = f*c.*c;
for n = 2:Nmax
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev