Mercurial > hg > octave-lyh
changeset 13029:50db905c3cf1
maint: periodic merge of stable to default
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 30 Aug 2011 14:37:25 -0400 |
parents | b9a89ca0fb75 (current diff) 9b191d0e547f (diff) |
children | b646413c3d0e |
files | doc/interpreter/matrix.txi scripts/plot/private/__print_parse_opts__.m src/DLD-FUNCTIONS/__magick_read__.cc src/data.cc src/oct-parse.yy |
diffstat | 6 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/matrix.txi +++ b/doc/interpreter/matrix.txi @@ -81,6 +81,9 @@ @DOCSTRING(lookup) +If you wish to check if a variable exists at all, instead of properties +its elements may have, consult @ref{Status of Variables}. + @node Rearranging Matrices @section Rearranging Matrices
--- a/doc/interpreter/numbers.txi +++ b/doc/interpreter/numbers.txi @@ -836,3 +836,7 @@ @DOCSTRING(islogical) @DOCSTRING(isprime) + +If instead of knowing properties of variables, you wish to know which +variables are defined and to gather other information about the +workspace itself, see @ref{Status of Variables}.
--- a/liboctave/dMatrix.cc +++ b/liboctave/dMatrix.cc @@ -3117,11 +3117,11 @@ %! cv = randn(10,1); %! rv = randn(1,10); %! rvt = rv'; -%!assert([M*cv,M*cv],M*[cv,cv],1e-14) -%!assert([M'*cv,M'*cv],M'*[cv,cv],3e-14) -%!assert([rv*M;rv*M],[rv;rv]*M,3e-14) -%!assert([rv*M';rv*M'],[rv;rv]*M',3e-14) -%!assert(2*rv*cv,[rv,rv]*[cv;cv],3e-14) +%!assert([M*cv,M*cv],M*[cv,cv],1e-13) +%!assert([M'*cv,M'*cv],M'*[cv,cv],1e-13) +%!assert([rv*M;rv*M],[rv;rv]*M,1e-13) +%!assert([rv*M';rv*M'],[rv;rv]*M',1e-13) +%!assert(2*rv*cv,[rv,rv]*[cv;cv],1e-13) %!assert(M'\cv,Mt\cv,1e-14) %!assert(M'\rv',Mt\rvt,1e-14) */
--- a/scripts/plot/private/__print_parse_opts__.m +++ b/scripts/plot/private/__print_parse_opts__.m @@ -570,7 +570,7 @@ case "inches" value = value * 72; case "centimeters" - value = value * 72 / 25.4; + value = value * 72 / 2.54; case "normalized" error ("print:customnormalized", "print.m: papersize=='<custom>' and paperunits='normalized' may not be combined");
--- a/src/DLD-FUNCTIONS/__magick_read__.cc +++ b/src/DLD-FUNCTIONS/__magick_read__.cc @@ -670,8 +670,7 @@ octave_idx_type rows = m.rows (); octave_idx_type columns = m.columns (); - // FIXME -- maybe simply using bit shifting would be better? - unsigned int div_factor = pow (2.0, static_cast<int> (bitdepth)) - 1; + unsigned int div_factor = (1 << bitdepth) - 1; for (unsigned int ii = 0; ii < nframes; ii++) { @@ -760,7 +759,7 @@ } im.quantizeColorSpace (Magick::GRAYColorspace); - im.quantizeColors (pow (2, bitdepth)); + im.quantizeColors (1 << bitdepth); im.quantize (); }