Mercurial > hg > octave-nkf
changeset 18969:bd1fd4ed3d67 gui-release
maint: Periodic merge of stable -> gui-release.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 25 May 2014 10:26:18 -0700 |
parents | a5286fb173cd (current diff) 6e2b1de8348e (diff) |
children | 888f8ce79bbe 59975c3cea6b |
files | libgui/src/main-window.cc libinterp/corefcn/data.cc libinterp/corefcn/graphics.cc libinterp/parse-tree/lex.ll |
diffstat | 8 files changed, 48 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/CITATION +++ b/CITATION @@ -1,17 +1,18 @@ To cite GNU Octave in publications use: - John W. Eaton, David Bateman, and Søren Hauberg (2009). GNU Octave version - 3.0.1 manual: a high-level interactive language for numerical computations. + John W. Eaton, David Bateman, Søren Hauberg, Rik Wehbring (2014). + GNU Octave version 3.8.1 manual: a high-level interactive language for + numerical computations. CreateSpace Independent Publishing Platform. ISBN 1441413006, URL http://www.gnu.org/software/octave/doc/interpreter/ A BibTeX entry for LaTeX users is: @book{, - author = {John W. Eaton and David Bateman and S\oren Hauberg}, - title = {{GNU Octave} version 3.0.1 manual: a high-level interactive language for numerical computations}, + author = {John W. Eaton, David Bateman, S\oren Hauberg, and Rik Wehbring}, + title = {{GNU Octave} version 3.8.1 manual: a high-level interactive language for numerical computations}, publisher = {CreateSpace Independent Publishing Platform}, - year = {2009}, + year = {2014}, note = {{ISBN} 1441413006}, url = {http://www.gnu.org/software/octave/doc/interpreter}, }
--- a/etc/CHECKLIST +++ b/etc/CHECKLIST @@ -2,6 +2,8 @@ * Update the version number and release date in configure.ac. + * Update version number and release year in CITATION. + * Update the NEWS file. * Update the NEWS-<VERSION>.html, index.in, news.in, and download.in
--- a/libgui/src/main-window.cc +++ b/libgui/src/main-window.cc @@ -740,6 +740,7 @@ { QString dir = QFileDialog::getExistingDirectory (this, tr ("Browse directories"), 0, + QFileDialog::ShowDirsOnly | QFileDialog::DontUseNativeDialog); set_current_working_directory (dir);
--- a/libinterp/corefcn/data.cc +++ b/libinterp/corefcn/data.cc @@ -3121,17 +3121,16 @@ result = Complex (0, 1) * SparseComplexMatrix (im_val); else { - result = SparseComplexMatrix (im_val.dims (), re_val (0)); octave_idx_type nr = im_val.rows (); octave_idx_type nc = im_val.cols (); + result = SparseComplexMatrix (nr, nc, re_val(0)); for (octave_idx_type j = 0; j < nc; j++) { octave_idx_type off = j * nr; for (octave_idx_type i = im_val.cidx (j); i < im_val.cidx (j + 1); i++) - result.data (im_val.ridx (i) + off) = - result.data (im_val.ridx (i) + off) + + result.data (im_val.ridx (i) + off) += Complex (0, im_val.data (i)); } } @@ -3144,19 +3143,17 @@ result = SparseComplexMatrix (re_val); else { - result = SparseComplexMatrix (re_val.rows (), - re_val.cols (), - Complex (0, im_val (0))); octave_idx_type nr = re_val.rows (); octave_idx_type nc = re_val.cols (); + result = SparseComplexMatrix (nr, nc, + Complex (0, im_val(0))); for (octave_idx_type j = 0; j < nc; j++) { octave_idx_type off = j * nr; for (octave_idx_type i = re_val.cidx (j); i < re_val.cidx (j + 1); i++) - result.data (re_val.ridx (i) + off) = - result.data (re_val.ridx (i) + off) + + result.data (re_val.ridx (i) + off) += re_val.data (i); } }
--- a/libinterp/corefcn/graphics.cc +++ b/libinterp/corefcn/graphics.cc @@ -9226,16 +9226,17 @@ int nargin = args.length (); - if (nargin != 1) + if (nargin == 1) + { + double h = args(0).double_value (); + if (! error_state) + retval = calc_dimensions (gh_manager::get_object (h)); + else + error ("__calc_dimensions__: expecting graphics handle as only argument"); + } + else print_usage (); - double h = args(0).double_value (); - - if (! error_state) - retval = calc_dimensions (gh_manager::get_object (h)); - else - error ("__calc_dimensions__: expecting graphics handle as only argument"); - return retval; }
--- a/libinterp/parse-tree/lex.ll +++ b/libinterp/parse-tree/lex.ll @@ -301,6 +301,18 @@ return curr_lexer->show_token (INPUT_FILE); } +<INPUT_FILE_START><<EOF>> { + curr_lexer->lexer_debug ("<INPUT_FILE_START><<EOF>>"); + + // May be reset later if we see "function" or "classdef" appears + // as the first token. + curr_lexer->reading_script_file = true; + + curr_lexer->pop_start_state (); + + return curr_lexer->show_token (INPUT_FILE); + } + %{ // Help and other command-style functions. %}
--- a/scripts/plot/draw/hist.m +++ b/scripts/plot/draw/hist.m @@ -157,7 +157,7 @@ if (nargin > 2 && ! ischar (varargin{iarg})) ## Normalize the histogram. norm = varargin{iarg++}; - freq *= norm / sum (! isnan (y)); + freq = bsxfun (@times, freq, norm ./ sum (! isnan (y))); endif if (nargout > 0) @@ -209,4 +209,6 @@ %! endfor %!assert (hist (1,1), 1) %!assert (size (hist (randn (750,240), 200)), [200,240]) - +## Test bug #42394 +%!assert (isempty (hist (rand (10,2), 0:5, 1)), false) +%!assert (isempty (hist (rand (10,2), 0:5, [1 1])), false)
--- a/scripts/plot/draw/private/__bar__.m +++ b/scripts/plot/draw/private/__bar__.m @@ -120,13 +120,17 @@ nbars = columns (y); - ## Column width is 1 for 'hist*' styles. Otherwise, same as group width. - if (nbars == 1) + ## Column width is 1 for 'hist*' styles (bars touch). + if (islogical (histc)) + cwidth = 1; + if (nbars == 1) + gwidth = 1; + else + gwidth = width^2; + endif + elseif (nbars == 1) cwidth = 1; gwidth = width; - elseif (islogical (histc)) - cwidth = 1; - gwidth = width^2; else cwidth = gwidth = width; endif