diff scripts/ode/ode45.m @ 20580:25623ef2ff4f

doc: Rewrite docstrings for ode* family of functions. * scripts/ode/module.mk: Remove extra newline. * ode45.m, odeget.m, odeset.m: Rewrite docstrings. * AbsRel_Norm.m, fuzzy_compare.m, hermite_quartic_interpolation.m, integrate_adaptive.m, integrate_const.m, integrate_n_steps.m, kahan.m, ode_struct_value_check.m, odepkg_event_handle.m, odepkg_structure_check.m, runge_kutta_45_dorpri.m, starting_stepsize.m: Don't break @deftypefn lines. Wrap lines at 80 columns rather than 72.
author Rik <rik@octave.org>
date Sat, 03 Oct 2015 21:03:16 -0700
parents 3339c9bdfe6a
children e368ce72a844
line wrap: on
line diff
--- a/scripts/ode/ode45.m	Sat Oct 03 16:21:58 2015 -0400
+++ b/scripts/ode/ode45.m	Sat Oct 03 21:03:16 2015 -0700
@@ -19,53 +19,58 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {[@var{sol}] =} ode45 (@var{fun}, @var{slot}, @var{init}, [@var{opt}], [@var{par1}, @var{par2}, @dots{}])
-## @deftypefnx {Function File} {[@var{t}, @var{y}, [@var{xe}, @var{ye}, @var{ie}]] =} ode45 (@var{fun}, @var{slot}, @var{init}, [@var{opt}], [@var{par1}, @var{par2}, @dots{}])
-##
-## This function file can be used to solve a set of non--stiff ordinary
-## differential equations (non--stiff ODEs) with the well known explicit
-## Dormand-Prince method of order 4.
+## @deftypefn  {Function File} {[@var{t}, @var{y}] =} ode45 (@var{fun}, @var{trange}, @var{init})
+## @deftypefnx {Function File} {[@var{t}, @var{y}] =} ode45 (@var{fun}, @var{trange}, @var{init}, @var{opt})
+## @deftypefnx {Function File} {[@var{t}, @var{y}] =} ode45 (@dots{}, @var{par1}, @var{par2}, @dots{})
+## @deftypefnx {Function File} {[@var{t}, @var{y}, @var{xe}, @var{ye}, @var{ie}] =} ode45 (@dots{})
+## @deftypefnx {Function File} {@var{sol} =} ode45 (@var{fun}, @var{trange}, @var{init}, @dots{})
 ##
-## 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}.
+## Solve a set of non-stiff Ordinary Differential Equations (non-stiff ODEs)
+## with the well known explicit Dormand-Prince method of order 4.
 ##
-## The first input argument must be a function_handle or an inline function that
-## defines the set of ODE: @code{y' = f(t,y)}. As described above, this function
-## must take two input arguments, where the first is the time and the second
-## the unknowns, and must have just one output argument.
+## The first input argument must be a function handle or inline function that
+## defines the ODE: @code{y' = f(t,y)}.  The function must accept two inputs
+## where the first is time @var{t} and the second is a column vector of
+## unknowns @var{y}.
 ##
-## The second input argument must contain time informations. Usually it should
-## be a vector with at least two elements which define the initial and the final
-## time instants; if the elements are more than two, then the solution will be
-## evaluated also at these intermediate time instants unless the integrate function
-## called is the @command{integrate_n_steps}. If there is only one time value,
-## then it will give an error unless the options structure has no empty fields
-## named @var{"TimeStepNumber"} and @var{"TimeStepSize"}. If the option
-## @var{"TimeStepSize"} is not empty, then the stepper called will be
-## @command{integrate_const}, if also @var{"TimeStepNumber"} is not empty it will
-## be called the integrate function @command{integrate_n_steps}, otherwise it will
-## be called @command{integrate_adaptive}. For this last possibility the user can
-## set the tolerance for the timestep computation by setting a value to the option
-## @var{"Tau"}, that as default value has @math{1.e-6}.
+## @var{trange} specifies the time interval over which the ODE will be
+## evaluated.  Usually, it is a two-element vector specifying the initial and
+## final times (@code{[tinit, tfinal]}).  If there are more than two elements
+## then the solution will also be evaluated at these intermediate time
+## instances unless the integrate function called is
+## @command{integrate_n_steps}.  If there is only one time value, then
+## @code{ode45} will raise an error unless the options structure has
+## non-empty fields named @var{"TimeStepNumber"} and @var{"TimeStepSize"}. 
+## If the option @var{"TimeStepSize"} is not empty, then the stepper called
+## will be @command{integrate_const}.  If @var{"TimeStepNumber"} is also
+## specified then the integrate function @command{integrate_n_steps} will be
+## used; otherwise, @command{integrate_adaptive} is used.  For this last
+## possibility the user can set the tolerance for the timestep computation by
+## changing the option @var{"Tau"}, that has a default value of @math{1e-6}.
 ##
-## The third input argument must contain the initial value for the unknown.
-## If this is a vector then the solution @var{y} will be a matrix in which each
-## column is the solution for the corresponding initial value in @var{init}.
+## The third input argument @var{init} contains the initial value for the
+## unknowns.  If this is a row vector then the solution @var{y} will be a matrix
+## in which each column is the solution for the corresponding initial value
+## in @var{init}.
 ##
-## The fourth input argument is not mandatory and it should contain a structure
-## with valid ODE fields.
+## If present, the fourth input argument specifies options to the ODE solver.
+## It is a structure typically generated by @code{odeset}.
+##
+## The function usually produces just two outputs.  Variable @var{t} is a
+## column vector and contains the times where the solution was found.  The
+## output @var{y} is a matrix in which each column refers to a different
+## unknown of the problem and each row corresponds to a time in @var{t}.
 ##
 ## For example, solve an anonymous implementation of the Van der Pol equation
+##
 ## @example
+## @group
 ## fvdp = @@(t,y) [y(2); (1 - y(1)^2) * y(2) - y(1)];
 ## [T,Y] = ode45 (fvdp, [0 20], [2 0]);
+## @end group
 ## @end example
+## @seealso{odeset, odeget}
 ## @end deftypefn
-##
 
 function [varargout] = ode45 (vfun, vslot, vinit, varargin)