Mercurial > octave
changeset 22940:2d7eb612d043
maint: Periodic merge of stable to default.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 26 Dec 2016 08:49:42 -0800 |
parents | a88ceac2aa53 (current diff) 54302b670139 (diff) |
children | d92ec2901770 |
files | scripts/ode/ode23.m scripts/ode/ode45.m |
diffstat | 3 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/CITATION Mon Dec 26 08:10:37 2016 -0800 +++ b/CITATION Mon Dec 26 08:49:42 2016 -0800 @@ -9,7 +9,7 @@ @manual{, title = {{GNU Octave} version 4.2.0 manual: a high-level interactive language for numerical computations}, - author = {John W. Eaton, David Bateman, S\oren Hauberg, and Rik Wehbring}, + author = {John W. Eaton and David Bateman and S{\o}ren Hauberg and Rik Wehbring}, year = {2016}, url = {http://www.gnu.org/software/octave/doc/interpreter}, }
--- a/scripts/ode/ode23.m Mon Dec 26 08:10:37 2016 -0800 +++ b/scripts/ode/ode23.m Mon Dec 26 08:49:42 2016 -0800 @@ -25,6 +25,7 @@ ## @deftypefnx {} {[@var{t}, @var{y}] =} ode23 (@var{fun}, @var{trange}, @var{init}, @var{ode_opt}) ## @deftypefnx {} {[@var{t}, @var{y}, @var{te}, @var{ye}, @var{ie}] =} ode23 (@dots{}) ## @deftypefnx {} {@var{solution} =} ode23 (@dots{}) +## @deftypefnx {} {} ode23 (@dots{}) ## ## Solve a set of non-stiff Ordinary Differential Equations (non-stiff ODEs) ## with the well known explicit @nospell{Bogacki-Shampine} method of order 3. @@ -66,19 +67,16 @@ ## Use @code{fieldnames (@var{solution})} to see the other fields and ## additional information returned. ## +## If no output arguments are requested, and no @code{OutputFcn} is +## specified in @var{ode_opt}, then the @code{OutputFcn} is set to +## @code{odeplot} and the results of the solver are plotted immediately. +## ## If using the @qcode{"Events"} option then three additional outputs may ## be returned. @var{te} holds the time when an Event function returned a ## zero. @var{ye} holds the value of the solution at time @var{te}. @var{ie} ## contains an index indicating which Event function was triggered in the case ## of multiple Event functions. ## -## This function can be called with two output arguments: @var{t} and @var{y}. -## Variable @var{t} is a column vector and contains the time stamps, instead -## @var{y} is a matrix in which each column refers to a different unknown of -## the problem and the rows number is the same of @var{t} rows number so -## that each row of @var{y} contains the values of all unknowns at the time -## value contained in the corresponding row in @var{t}. -## ## Example: Solve the @nospell{Van der Pol} equation ## ## @example @@ -277,7 +275,7 @@ varargout{1}.stats.ndecomps = ndecomps; varargout{1}.stats.nlinsols = nlinsols; endif - elseif (nargout == 5) + elseif (nargout > 2) varargout = cell (1,5); varargout{1} = solution.t; varargout{2} = solution.x;
--- a/scripts/ode/ode45.m Mon Dec 26 08:10:37 2016 -0800 +++ b/scripts/ode/ode45.m Mon Dec 26 08:49:42 2016 -0800 @@ -25,6 +25,7 @@ ## @deftypefnx {} {[@var{t}, @var{y}] =} ode45 (@var{fun}, @var{trange}, @var{init}, @var{ode_opt}) ## @deftypefnx {} {[@var{t}, @var{y}, @var{te}, @var{ye}, @var{ie}] =} ode45 (@dots{}) ## @deftypefnx {} {@var{solution} =} ode45 (@dots{}) +## @deftypefnx {} {} ode45 (@dots{}) ## ## Solve a set of non-stiff Ordinary Differential Equations (non-stiff ODEs) ## with the well known explicit @nospell{Dormand-Prince} method of order 4. @@ -64,6 +65,10 @@ ## Use @code{fieldnames (@var{solution})} to see the other fields and ## additional information returned. ## +## If no output arguments are requested, and no @code{OutputFcn} is +## specified in @var{ode_opt}, then the @code{OutputFcn} is set to +## @code{odeplot} and the results of the solver are plotted immediately. +## ## If using the @qcode{"Events"} option then three additional outputs may ## be returned. @var{te} holds the time when an Event function returned a ## zero. @var{ye} holds the value of the solution at time @var{te}. @var{ie} @@ -271,7 +276,7 @@ varargout{1}.stats.ndecomps = ndecomps; varargout{1}.stats.nlinsols = nlinsols; endif - elseif (nargout == 5) + elseif (nargout > 2) varargout = cell (1,5); varargout{1} = solution.t; varargout{2} = solution.x;