Mercurial > hg > octave-lyh
changeset 6431:ff87ad14403f
[project @ 2007-03-22 18:20:31 by jwe]
author | jwe |
---|---|
date | Thu, 22 Mar 2007 18:20:32 +0000 |
parents | 215b141470b4 |
children | 5bec61ae1576 |
files | doc/ChangeLog doc/interpreter/sparse.txi scripts/ChangeLog scripts/linear-algebra/null.m scripts/plot/__go_draw_axes__.m src/ChangeLog src/DLD-FUNCTIONS/__qp__.cc src/parse.y |
diffstat | 8 files changed, 37 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,7 @@ +2007-03-21 G. D. McBain <geordie.mcbain@aeromech.usyd.edu.au> + + * interpreter/sparse.txi: Delete repeated word. + 2007-03-20 G. D. McBain <geordie.mcbain@aeromech.usyd.edu.au> * interpreter/sparse.txi: Clarify sparse matrix creation example.
--- a/doc/interpreter/sparse.txi +++ b/doc/interpreter/sparse.txi @@ -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
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,13 @@ +2007-03-22 John W. Eaton <jwe@octave.org> + + * plot/__go_draw_axes__.m: If no real data, plot a point at Inf, + Inf to show axes. From Daniel J Sebald <daniel.sebald@ieee.org>. + +2007-03-21 John W. Eaton <jwe@octave.org> + + * linear-algebra/null.m: Set elements of retval with magnitudes + less than eps to 0. + 2007-03-21 David Bateman <dbateman@free.fr> * 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 <daniel.sebald@ieee.org>. +2007-03-20 Daniel J Sebald <daniel.sebald@ieee.org> * image/__img__.m: Maybe set yaxis to reverse for images. * plot/__go_draw_axes__.m: Don't add flipy to gnuplot command for
--- a/scripts/linear-algebra/null.m +++ b/scripts/linear-algebra/null.m @@ -61,6 +61,7 @@ if (rank < cols) retval = V (:, rank+1:cols); + retval(abs (retval) < eps) = 0; else retval = zeros (cols, 0); endif
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -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);
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ +2007-03-22 John W. Eaton <jwe@octave.org> + + * src/parse.y (Fautoload): Use warning_with_id. + 2007-03-21 John W. Eaton <jwe@octave.org> + * 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.
--- a/src/DLD-FUNCTIONS/__qp__.cc +++ b/src/DLD-FUNCTIONS/__qp__.cc @@ -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)
--- a/src/parse.y +++ b/src/parse.y @@ -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; }