Mercurial > octave
changeset 22939:54302b670139 stable
doc: Document nargout=0 calling mode for ode23, ode45.
* ode23.m, ode45.m: Describe what happens when nargout=0 and add that calling
form to list at start of documentation.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 26 Dec 2016 08:48:58 -0800 |
parents | 2b2ac017c901 |
children | 2d7eb612d043 8defe99c9650 |
files | scripts/ode/ode23.m scripts/ode/ode45.m |
diffstat | 2 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ode/ode23.m Mon Dec 26 08:08:04 2016 -0800 +++ b/scripts/ode/ode23.m Mon Dec 26 08:48:58 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
--- a/scripts/ode/ode45.m Mon Dec 26 08:08:04 2016 -0800 +++ b/scripts/ode/ode45.m Mon Dec 26 08:48:58 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}