www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conbase/syncToModel.m

    function obj = syncToModel(obj,m,~)
%syncToModel syncronhise conswitch constraint to model
%  obj = syncToModel(obj,m,Xg)
%      operating points and tolerances are of the conswitch are syncronhised with
%      xregmodswitch model
%      ranges are also updated

%  Copyright 2012 The MathWorks, Inc. and Ford Global Technologies, Inc.


cif = getInputFactors(obj);
% make sure the ranges are the same otherwise the tolerances will be
% awry

R = getranges(m);
if ~isequal(R,getRange(cif));
    % make a new copy of boundary model wrapper
    cif = setRange(cif,R);
    obj = setInputFactors(obj,cif);
end