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

    function varargout= set(L,Property,Value)
%SET set localavfit properties
%   m=set(m,Property,Value)

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

switch lower(Property)
    case 'model'
        L = copyToInternal(L);
        m = copymodel(L.model,Value);
        % no ytrans
        set(m,'ytrans','');
        L.model = m;
        L = copyToExternal(L);
    case 'internalmodel'
        L.model = Value;
    otherwise
        [L.localmod,Found] =set(L.localmod,Property,Value);
        if ~Found 
            try
                L.xregmodel= set(L.xregmodel,Property,Value);
            catch
                L.model= set(L.model,Property,Value);
            end
        end
end
if nargout 
   varargout{1}=L;
else
   assignin('caller',inputname(1),L);
end