www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregtransient/state0.m

    function [ic,D] = state0(D,varargin)
%STATE0         out = state0(D,varargin)
% nargin==1 returns D.state0 of D


%  Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc.


try
    ic = feval(name(D),D,'initcond',varargin{:});
catch ME
    if ~strcmp(ME.identifier,'MATLAB:UndefinedFunction') || isempty(strfind(ME.message,'i_initcond'))
        % It is permissible not to define state0 in the MATLAB file
        ReportError(D,ME)
    end
    ic = [];
end
D.state0= ic;