# HG changeset patch # User jwe # Date 1182184128 0 # Node ID ebf96cc00ee9ce8cfe3dd9dd536f5c253a218a0e # Parent 00116015904db1505e72560d4c35d5bc086a5014 [project @ 2007-06-18 16:27:52 by jwe] diff -r 00116015904d -r ebf96cc00ee9 ChangeLog --- a/ChangeLog Mon Jun 18 16:07:14 2007 +0000 +++ b/ChangeLog Mon Jun 18 16:28:48 2007 +0000 @@ -1,3 +1,8 @@ +2007-06-18 John W. Eaton + + * emacs/octave-inf.el (inferior-octave-prompt): Match "octave.bin" + and "octave.exe" in addition to "octave". + 2007-06-15 John W. Eaton * run-octave.in: Use simple string concatenation instead of diff -r 00116015904d -r ebf96cc00ee9 emacs/octave-inf.el --- a/emacs/octave-inf.el Mon Jun 18 16:07:14 2007 +0000 +++ b/emacs/octave-inf.el Mon Jun 18 16:28:48 2007 +0000 @@ -41,7 +41,7 @@ :group 'octave-inferior) (defcustom inferior-octave-prompt - "\\(^octave\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " + "\\(^octave\\(\\|.bin\\|.exe\\)\\(-[.0-9]+\\)?\\(:[0-9]+\\)?\\|^debug\\|^\\)>+ " "*Regexp to match prompts for the inferior Octave process." :type 'regexp :group 'octave-inferior) diff -r 00116015904d -r ebf96cc00ee9 scripts/ChangeLog --- a/scripts/ChangeLog Mon Jun 18 16:07:14 2007 +0000 +++ b/scripts/ChangeLog Mon Jun 18 16:28:48 2007 +0000 @@ -1,3 +1,9 @@ +2007-06-18 Søren Hauberg + + * general/interp1.m, general/interp2.m, general/interp3.m, + general/interpn.m: Replace, NaN with NA. Use isna instead of == + to check for NA. + 2007-06-18 Søren Hauberg * optimization/glpk.m: TeXified the help text. diff -r 00116015904d -r ebf96cc00ee9 scripts/general/interp1.m --- a/scripts/general/interp1.m Mon Jun 18 16:07:14 2007 +0000 +++ b/scripts/general/interp1.m Mon Jun 18 16:28:48 2007 +0000 @@ -51,7 +51,7 @@ ## ## If @var{extrap} is the string 'extrap', then extrapolate values beyond ## the endpoints. If @var{extrap} is a number, replace values beyond the -## endpoints with that number. If @var{extrap} is missing, assume NaN. +## endpoints with that number. If @var{extrap} is missing, assume NA. ## ## If the string argument 'pp' is specified, then @var{xi} should not be ## supplied and @code{interp1} returns the piece-wise polynomial that @@ -95,7 +95,7 @@ endif method = "linear"; - extrap = NaN; + extrap = NA; xi = []; pp = false; firstnumeric = true; @@ -378,7 +378,7 @@ ## There is an ENDBLOCKTEST after the final block %!test style = "nearest"; ## BLOCK -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -395,7 +395,7 @@ %!assert (interp1(xp,[yp',yp'],xi,style), %! interp1(xp,[yp',yp'],xi,["*",style]),100*eps); %!test style=['*',style]; -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -412,7 +412,7 @@ ## ENDBLOCK %!test style='linear'; ## BLOCK -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -429,7 +429,7 @@ %!assert (interp1(xp,[yp',yp'],xi,style), %! interp1(xp,[yp',yp'],xi,["*",style]),100*eps); %!test style=['*',style]; -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -446,7 +446,7 @@ ## ENDBLOCK %!test style='cubic'; ## BLOCK -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -463,7 +463,7 @@ %!assert (interp1(xp,[yp',yp'],xi,style), %! interp1(xp,[yp',yp'],xi,["*",style]),100*eps); %!test style=['*',style]; -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -480,7 +480,7 @@ ## ENDBLOCK %!test style='pchip'; ## BLOCK -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -497,7 +497,7 @@ %!assert (interp1(xp,[yp',yp'],xi,style), %! interp1(xp,[yp',yp'],xi,["*",style]),100*eps); %!test style=['*',style]; -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -514,7 +514,7 @@ ## ENDBLOCK %!test style='spline'; ## BLOCK -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -531,7 +531,7 @@ %!assert (interp1(xp,[yp',yp'],xi,style), %! interp1(xp,[yp',yp'],xi,["*",style]),100*eps); %!test style=['*',style]; -%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NaN, NaN]); +%!assert (interp1(xp, yp, [min(xp)-1, max(xp)+1],style), [NA, NA]); %!assert (interp1(xp,yp,xp,style), yp, 100*eps); %!assert (interp1(xp,yp,xp',style), yp', 100*eps); %!assert (interp1(xp',yp',xp',style), yp', 100*eps); @@ -566,7 +566,7 @@ %!error interp1(1,1,1, "*nearest"); %!assert (interp1(1:2:4,1:2:4,1.4,"*nearest"),1); %!error interp1(1,1,1, "*linear"); -%!assert (interp1(1:2:4,1:2:4,[0,1,1.4,3,4],"*linear"),[NaN,1,1.4,3,NaN]); +%!assert (interp1(1:2:4,1:2:4,[0,1,1.4,3,4],"*linear"),[NA,1,1.4,3,NA]); %!error interp1(1:3,1:3,1, "*cubic"); %!assert (interp1(1:2:8,1:2:8,1.4,"*cubic"),1.4); %!error interp1(1:2,1:2,1, "*spline"); diff -r 00116015904d -r ebf96cc00ee9 scripts/general/interp2.m --- a/scripts/general/interp2.m Mon Jun 18 16:07:14 2007 +0000 +++ b/scripts/general/interp2.m Mon Jun 18 16:28:48 2007 +0000 @@ -68,7 +68,7 @@ ## If a scalar value @var{extrapval} is defined as the final value, then ## values outside the mesh as set to this value. Note that in this case ## @var{method} must be defined as well. If @var{extrapval} is not -## defined then NaN is assumed. +## defined then NA is assumed. ## ## @seealso{interp1} ## @end deftypefn @@ -92,7 +92,7 @@ function ZI = interp2 (varargin) Z = X = Y = XI = YI = n = []; method = "linear"; - extrapval = NaN; + extrapval = NA; switch (nargin) case 1 @@ -218,7 +218,7 @@ ZI = Z(idx); endif - ## set points outside the table to NaN + ## set points outside the table to 'extrapval' ZI (XI < X(1,1) | XI > X(1,end) | YI < Y(1,1) | YI > Y(end,1)) = extrapval; ZI = reshape (ZI, shape); else @@ -337,7 +337,7 @@ %! Orig = X.^2 + Y.^3; %! xi = [0,4]; %! yi = [3,8]'; -%! assert(interp2(x,y,Orig, xi, yi),[nan,nan;nan,nan]); +%! assert(interp2(x,y,Orig, xi, yi),[NA,NA;NA,NA]); %! assert(interp2(x,y,Orig, xi, yi,'linear', 0),[0,0;0,0]); %!test % for values at boundaries diff -r 00116015904d -r ebf96cc00ee9 scripts/general/interp3.m --- a/scripts/general/interp3.m Mon Jun 18 16:07:14 2007 +0000 +++ b/scripts/general/interp3.m Mon Jun 18 16:28:48 2007 +0000 @@ -58,13 +58,13 @@ ## ## If @var{extrap} is the string 'extrap', then extrapolate values beyond ## the endpoints. If @var{extrap} is a number, replace values beyond the -## endpoints with that number. If @var{extrap} is missing, assume NaN. +## endpoints with that number. If @var{extrap} is missing, assume NA. ## @seealso{interp1, interp2, spline, meshgrid} ## @end deftypefn function vi = interp3 (varargin) method = "linear"; - extrapval = NaN; + extrapval = NA; nargs = nargin; if (nargin < 1) diff -r 00116015904d -r ebf96cc00ee9 scripts/general/interpn.m --- a/scripts/general/interpn.m Mon Jun 18 16:07:14 2007 +0000 +++ b/scripts/general/interpn.m Mon Jun 18 16:28:48 2007 +0000 @@ -58,14 +58,14 @@ ## ## If @var{extrap} is the string 'extrap', then extrapolate values beyond ## the endpoints. If @var{extrap} is a number, replace values beyond the -## endpoints with that number. If @var{extrap} is missing, assume NaN. +## endpoints with that number. If @var{extrap} is missing, assume NA. ## @seealso{interp1, interp2, spline, ndgrid} ## @end deftypefn function vi = interpn (varargin) method = "linear"; - extrapval = NaN; + extrapval = NA; nargs = nargin; if (nargin < 1) @@ -150,7 +150,7 @@ method = tolower (method); if (strcmp (method, "linear")) vi = __lin_interpn__ (x{:}, v, y{:}); - vi (vi == NaN) = extrapval; + vi (isna (vi)) = extrapval; elseif (strcmp (method, "nearest")) yshape = size (y{1}); yidx = cell (1, nd); diff -r 00116015904d -r ebf96cc00ee9 src/ChangeLog --- a/src/ChangeLog Mon Jun 18 16:07:14 2007 +0000 +++ b/src/ChangeLog Mon Jun 18 16:28:48 2007 +0000 @@ -1,3 +1,7 @@ +2007-06-18 Søren Hauberg + + * DLD-FUNCTIONS/__lin_interpn__.cc: Replace octave_NaN with octave_NA. + 2007-06-15 Shai Ayal * graphics.h (OCTAVE_GRAPHICS_PROPERTY_INTERNAL, diff -r 00116015904d -r ebf96cc00ee9 src/DLD-FUNCTIONS/__lin_interpn__.cc --- a/src/DLD-FUNCTIONS/__lin_interpn__.cc Mon Jun 18 16:07:14 2007 +0000 +++ b/src/DLD-FUNCTIONS/__lin_interpn__.cc Mon Jun 18 16:28:48 2007 +0000 @@ -188,7 +188,7 @@ double *vi = Vi.fortran_vec (); octave_idx_type Ni = Vi.numel (); - double extrapval = octave_NaN; + double extrapval = octave_NA; for (int i = 0; i < n; i++) {