Mercurial > octave-libtiff
view doc/interpreter/diffeq.txi @ 19040:0850b5212619
doc: Add @nospell macro around proper names in documentation.
* aspell-octave.en.pws: Remove proper names from Octave's custom dictionary.
* doc/interpreter/audio.txi, doc/interpreter/diagperm.txi,
doc/interpreter/diffeq.txi, doc/interpreter/emacs.txi,
doc/interpreter/func.txi, doc/interpreter/geometry.txi,
doc/interpreter/intro.txi, doc/interpreter/linalg.txi,
doc/interpreter/numbers.txi, doc/interpreter/preface.txi,
doc/interpreter/quad.txi, doc/interpreter/sparse.txi,
libinterp/corefcn/colloc.cc, libinterp/corefcn/ellipj.cc,
libinterp/corefcn/gammainc.cc, libinterp/corefcn/hess.cc,
libinterp/corefcn/quadcc.cc, libinterp/corefcn/rand.cc,
libinterp/corefcn/sqrtm.cc, libinterp/dldfcn/ccolamd.cc,
libinterp/dldfcn/colamd.cc, libinterp/dldfcn/dmperm.cc,
libinterp/dldfcn/symrcm.cc, scripts/general/quadgk.m, scripts/general/quadl.m,
scripts/linear-algebra/commutation_matrix.m, scripts/linear-algebra/condest.m,
scripts/linear-algebra/duplication_matrix.m, scripts/linear-algebra/expm.m,
scripts/linear-algebra/housh.m, scripts/linear-algebra/krylov.m,
scripts/linear-algebra/onenormest.m, scripts/linear-algebra/qzhess.m,
scripts/optimization/fminsearch.m, scripts/optimization/glpk.m,
scripts/signal/arch_fit.m, scripts/signal/bartlett.m,
scripts/signal/blackman.m, scripts/signal/diffpara.m,
scripts/signal/durbinlevinson.m, scripts/signal/hamming.m,
scripts/signal/hanning.m, scripts/sparse/eigs.m, scripts/sparse/pcg.m,
scripts/sparse/pcr.m, scripts/specfun/ellipke.m,
scripts/special-matrix/gallery.m, scripts/special-matrix/invhilb.m,
scripts/statistics/base/quantile.m,
scripts/statistics/tests/kruskal_wallis_test.m,
scripts/statistics/tests/manova.m, scripts/statistics/tests/mcnemar_test.m:
Add @nospell macro around proper names in documentation.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 21 Aug 2014 15:57:18 -0700 |
parents | d63878346099 |
children | 0e1f5a750d00 |
line wrap: on
line source
@c Copyright (C) 1996-2013 John W. Eaton @c @c This file is part of Octave. @c @c Octave is free software; you can redistribute it and/or modify it @c under the terms of the GNU General Public License as published by the @c Free Software Foundation; either version 3 of the License, or (at @c your option) any later version. @c @c Octave is distributed in the hope that it will be useful, but WITHOUT @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License @c for more details. @c @c You should have received a copy of the GNU General Public License @c along with Octave; see the file COPYING. If not, see @c <http://www.gnu.org/licenses/>. @node Differential Equations @chapter Differential Equations Octave has built-in functions for solving ordinary differential equations, and differential-algebraic equations. All solvers are based on reliable ODE routines written in Fortran. @menu * Ordinary Differential Equations:: * Differential-Algebraic Equations:: @end menu @cindex differential equations @cindex ODE @cindex DAE @node Ordinary Differential Equations @section Ordinary Differential Equations The function @code{lsode} can be used to solve ODEs of the form @tex $$ {dx\over dt} = f (x, t) $$ @end tex @ifnottex @example @group dx -- = f (x, t) dt @end group @end example @end ifnottex @noindent using @nospell{Hindmarsh's} ODE solver @sc{lsode}. @DOCSTRING(lsode) @DOCSTRING(lsode_options) Here is an example of solving a set of three differential equations using @code{lsode}. Given the function @cindex oregonator @example @group ## oregonator differential equation function xdot = f (x, t) xdot = zeros (3,1); xdot(1) = 77.27 * (x(2) - x(1)*x(2) + x(1) \ - 8.375e-06*x(1)^2); xdot(2) = (x(3) - x(1)*x(2) - x(2)) / 77.27; xdot(3) = 0.161*(x(1) - x(3)); endfunction @end group @end example @noindent and the initial condition @code{x0 = [ 4; 1.1; 4 ]}, the set of equations can be integrated using the command @example @group t = linspace (0, 500, 1000); y = lsode ("f", x0, t); @end group @end example If you try this, you will see that the value of the result changes dramatically between @var{t} = 0 and 5, and again around @var{t} = 305. A more efficient set of output points might be @example @group t = [0, logspace(-1, log10(303), 150), \ logspace(log10(304), log10(500), 150)]; @end group @end example See @nospell{Alan C. Hindmarsh}, @cite{ODEPACK, A Systematized Collection of ODE Solvers}, in Scientific Computing, @nospell{R. S. Stepleman}, editor, (1983) for more information about the inner workings of @code{lsode}. An m-file for the differential equation used above is included with the Octave distribution in the examples directory under the name @file{oregonator.m}. @node Differential-Algebraic Equations @section Differential-Algebraic Equations The function @code{daspk} can be used to solve DAEs of the form @tex $$ 0 = f (\dot{x}, x, t), \qquad x(t=0) = x_0, \dot{x}(t=0) = \dot{x}_0 $$ @end tex @ifnottex @example 0 = f (x-dot, x, t), x(t=0) = x_0, x-dot(t=0) = x-dot_0 @end example @end ifnottex @noindent where @tex $\dot{x} = {dx \over dt}$ @end tex @ifnottex @math{x-dot} @end ifnottex is the derivative of @math{x}. The equation is solved using @nospell{Petzold's} DAE solver @sc{daspk}. @DOCSTRING(daspk) @DOCSTRING(daspk_options) Octave also includes @sc{dassl}, an earlier version of @sc{daspk}, and @sc{dasrt}, which can be used to solve DAEs with constraints (stopping conditions). @DOCSTRING(dassl) @DOCSTRING(dassl_options) @DOCSTRING(dasrt) @DOCSTRING(dasrt_options) See @nospell{K. E. Brenan}, et al., @cite{Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations}, North-Holland (1989) for more information about the implementation of @sc{dassl}.