1## Copyright (C) 2016 Parsiad Azimzadeh <parsiad.azimzadeh@gmail.com>
2##
3## This program is free software; you can redistribute it and/or modify it under
4## the terms of the GNU Lesser General Public License as published by the Free
5## Software Foundation; either version 3 of the License, or (at your option) any
6## later version.
7##
8## This program is distributed in the hope that it will be useful, but WITHOUT
9## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10## FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11## for more details.
12##
13## You should have received a copy of the GNU Lesser General Public License
14## along with this program; if not, see <http://www.gnu.org/licenses/>.
15
16## -*- texinfo -*-
17## @deftypefn  {Function File} {@var{SDE} =} sdeld (@var{A}, @var{B}, @var{Alpha}, @var{Sigma})
18## @deftypefnx {Function File} {@var{SDE} =} sdeld (@var{A}, @var{B}, @var{Alpha}, @var{Sigma}, @var{OptionName}, @var{OptionValue}, @dots{})
19## Creates an object to represent a stochastic differential equation (SDE) in
20## linear drift-rate form.
21##
22## @center dX_t = (@var{A}(t) + @var{B}(t) * X_t)dt + (diag(X_t.^@var{Alpha}(t)) * @var{Sigma}(t))dW_t
23##
24## @itemize
25## @item (X_t) is an NVARS-dimensional process;
26## @item (W_t) is an NBROWNS-dimensional Wiener process.
27## @end itemize
28##
29## The parameters @var{A} and @var{B} appear in the @@sde/drift documentation.
30##
31## The parameters @var{Alpha} and @var{Sigma} appear in the @@sde/diffusion
32## documentation.
33##
34## See the @@sde documentation for a list of optional arguments.
35##
36## @seealso{drift, diffusion, sde}
37## @end deftypefn
38
39function SDE = sdeld (A, B, Alpha, Sigma, varargin)
40
41  if (nargin < 4)
42    print_usage ();
43  endif
44
45  Drift = drift (A, B);
46  Diffusion = diffusion (Alpha, Sigma);
47  SDE = sde (Drift, Diffusion, varargin{:});
48
49endfunction
50