all trials. If StartState is a matrix, a unique 
%     initial value is applied to each state variable on each of NTRIALS
%     trials. The default is 1.
%
%   Correlation - Correlation between Gaussian random variates drawn to 
%     generate the Brownian motion vector (Wiener processes). Correlation may
%     be specified as an NBROWNS x NBROWNS positive semi-definite matrix, or 
%     as a deterministic function of time that accepts the current time "t" 
%     and returns an NBROWNS x NBROWNS positive semi-definite correlation 
%     matrix. As a matrix, Correlation represents a static condition. As a 
%     deterministic function of time, it allows users to specify a dynamic 
%     correlation structure. The default is an NBROWNS x NBROWNS identity 
%     matrix (independent Gaussian processes). 
%
%   Simulation - A user-defined simulation function or simulation method. 
%     The default simulation is an Euler approximation (simByEuler).
%
% Outputs:
%
%   MDL - Linear drift rate SDE model with the following parameters:
%
%     StartTime   - Initial observation time
%     StartState  - Initial state at StartTime
%     Correlation - Access utility for the Correlation parameter
%     Drift       - Composite drift rate function
%     Diffusion   - Composite diffusion rate function
%     A           - Access utility for the intercept parameter A
%     B           - Access utility for the first-order parameter B
%     Alpha       - Access utility for the input parameter Alpha
%     Sigma       - Access utility for the input parameter Sigma
%     Simulation  - Simulation function/method
%
% See also DRIFT/DRIFT, DIFFUSION/DIFFUSION, SDEDDO.

% Copyright 1995-2007 The MathWorks, Inc.  

%
%  * * * * * * * * * * * Define SDELD Methods * * * * * * * * * * * 
%
  methods (Access = 'public')
%
%   Constructor Method.
%
    function OBJ = sdeld(A, B, alpha, sigma, varargin)

      if (nargin < 4) || isempty(A)     || isempty(B) ...
                      || isempty(alpha) || isempty(sigma)
          error(message('finan