www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@mbcmodel/@model/pAssertIsFitted.m

    function e = pAssertIsFitted(obj,message)
%PASSERTISFITTITED -- 
%
%  E = PASSERTISFITTED(OBJ)
%  E = PASSERTISFITTED(OBJ,MESSAGE)
%
%  See also PASSERTISBEINGEDITED,PASSERTNOTBEINGEDITED.

%  Copyright 2006 The MathWorks, Inc.

if nargin<2,
    message = 'Model not fitted';
end

if obj.ModelStatus == 0,
    e = struct( ...
        'identifier', 'mbc:mbcmodel:model:InvalidState', ...
        'message', message );
else
    e = struct( 'identifier', {}, 'message', {} );
end