# HG changeset patch # User jwe # Date 1174587632 0 # Node ID ff87ad14403f348605cc8e298bd78c9b1f260fe6 # Parent 215b141470b48dc331373b57348f786f39cd4bc0 [project @ 2007-03-22 18:20:31 by jwe] diff -r 215b141470b4 -r ff87ad14403f doc/ChangeLog --- a/doc/ChangeLog Wed Mar 21 20:58:08 2007 +0000 +++ b/doc/ChangeLog Thu Mar 22 18:20:32 2007 +0000 @@ -1,3 +1,7 @@ +2007-03-21 G. D. McBain + + * interpreter/sparse.txi: Delete repeated word. + 2007-03-20 G. D. McBain * interpreter/sparse.txi: Clarify sparse matrix creation example. diff -r 215b141470b4 -r ff87ad14403f doc/interpreter/sparse.txi --- a/doc/interpreter/sparse.txi Wed Mar 21 20:58:08 2007 +0000 +++ b/doc/interpreter/sparse.txi Thu Mar 22 18:20:32 2007 +0000 @@ -506,7 +506,7 @@ will give. The first example of @var{s} raised to the power of 2 causes no problems. However @var{s} raised element-wise to itself involves a -a large number of terms @code{0 .^ 0} which is 1. There @code{@var{s} .^ +large number of terms @code{0 .^ 0} which is 1. There @code{@var{s} .^ @var{s}} is a full matrix. Likewise @code{@var{s} .^ -2} involves terms terms like @code{0 .^ -2} which diff -r 215b141470b4 -r ff87ad14403f scripts/ChangeLog --- a/scripts/ChangeLog Wed Mar 21 20:58:08 2007 +0000 +++ b/scripts/ChangeLog Thu Mar 22 18:20:32 2007 +0000 @@ -1,3 +1,13 @@ +2007-03-22 John W. Eaton + + * plot/__go_draw_axes__.m: If no real data, plot a point at Inf, + Inf to show axes. From Daniel J Sebald . + +2007-03-21 John W. Eaton + + * linear-algebra/null.m: Set elements of retval with magnitudes + less than eps to 0. + 2007-03-21 David Bateman * plot/__go_draw_axes__.m: Handle some colors with older gnuplot. @@ -24,7 +34,7 @@ * plot/clf.m: Don't call drawnow. -2007-03-20 Daniel J Sebald . +2007-03-20 Daniel J Sebald * image/__img__.m: Maybe set yaxis to reverse for images. * plot/__go_draw_axes__.m: Don't add flipy to gnuplot command for diff -r 215b141470b4 -r ff87ad14403f scripts/linear-algebra/null.m --- a/scripts/linear-algebra/null.m Wed Mar 21 20:58:08 2007 +0000 +++ b/scripts/linear-algebra/null.m Thu Mar 22 18:20:32 2007 +0000 @@ -61,6 +61,7 @@ if (rank < cols) retval = V (:, rank+1:cols); + retval(abs (retval) < eps) = 0; else retval = zeros (cols, 0); endif diff -r 215b141470b4 -r ff87ad14403f scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Wed Mar 21 20:58:08 2007 +0000 +++ b/scripts/plot/__go_draw_axes__.m Thu Mar 22 18:20:32 2007 +0000 @@ -349,7 +349,7 @@ case "line" data_idx++; - filespec{data_idx} = '-'; + filespec{data_idx} = "-"; if (isempty (obj.keylabel)) titlespec{data_idx} = "title \"\""; else @@ -485,7 +485,7 @@ case "surface" data_idx++; [style, typ] = do_linestyle_command (obj, data_idx, plot_stream); - filespec{data_idx} = '-'; + filespec{data_idx} = "-"; if (isempty (obj.keylabel)) titlespec{data_idx} = "title \"\""; else @@ -723,6 +723,8 @@ fputs (plot_stream, "e\n"); endif endfor + else + fputs (plot_stream, "plot \"-\";\nInf Inf\ne\n"); endif fflush (plot_stream); diff -r 215b141470b4 -r ff87ad14403f src/ChangeLog --- a/src/ChangeLog Wed Mar 21 20:58:08 2007 +0000 +++ b/src/ChangeLog Thu Mar 22 18:20:32 2007 +0000 @@ -1,5 +1,12 @@ +2007-03-22 John W. Eaton + + * src/parse.y (Fautoload): Use warning_with_id. + 2007-03-21 John W. Eaton + * DLD-FUNCTIONS/__qp__.cc (ABS): Delete. Use std::abs instead. + (null): Set elements of retval with magnitudes less than eps to 0. + * error.cc (Fwarning): Allow setting options with struct. If setting options, return previous state. diff -r 215b141470b4 -r ff87ad14403f src/DLD-FUNCTIONS/__qp__.cc --- a/src/DLD-FUNCTIONS/__qp__.cc Wed Mar 21 20:58:08 2007 +0000 +++ b/src/DLD-FUNCTIONS/__qp__.cc Thu Mar 22 18:20:32 2007 +0000 @@ -39,12 +39,6 @@ #include "pr-output.h" #include "utils.h" -static inline double -ABS (double x) -{ - return x < 0 ? -x : x; -} - static Matrix null (const Matrix& A, octave_idx_type& rank) { @@ -81,6 +75,10 @@ retval = V.extract (0, rank, A_nc-1, A_nc-1); else retval.resize (A_nc, 0); + + for (octave_idx_type i = 0; i < retval.numel (); i++) + if (std::abs (retval(i)) < DBL_EPSILON) + retval(i) = 0; } return retval; @@ -125,7 +123,7 @@ for (octave_idx_type i = 0; i < n_in; i++) { - res(i) /= (1.0 + ABS (bin(i))); + res(i) /= (1.0 + std::abs (bin(i))); if (res(i) < rtol) { @@ -304,7 +302,7 @@ // Checking the step-size. ColumnVector abs_p (n); for (octave_idx_type i = 0; i < n; i++) - abs_p(i) = ABS (p(i)); + abs_p(i) = std::abs (p(i)); double max_p = abs_p.max (); if (max_p < rtol) diff -r 215b141470b4 -r ff87ad14403f src/parse.y --- a/src/parse.y Wed Mar 21 20:58:08 2007 +0000 +++ b/src/parse.y Thu Mar 22 18:20:32 2007 +0000 @@ -3568,8 +3568,9 @@ std::string nm = argv[2]; if (! octave_env::absolute_pathname (nm)) - warning ("autoload: `%s' is not an absolute file name", - nm.c_str ()); + warning_with_id ("Octave:autoload-relative-file-name", + "autoload: `%s' is not an absolute file name", + nm.c_str ()); autoload_map[argv[1]] = nm; }