www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@conboolean/loadobj.m
function con = loadobj(con) %LOADOBJ Load filter for boolean constraint objects % % CON = LOADOBJ(CON) % % For old forms of constraints, the LOADOBJ method updates the object % structure and partially increments the version number. Where required, % nominal values will be used for the variable information, etc. Use the % UPGRADE method to update this information. % % See also LOADOBJ, CONBASE/LOADOBJ, CONBOOLEAN/UPGRADE. % Copyright 2005 The MathWorks, Inc. if con.Version == 1.5, warning(message('mbc:conboolean:MissedUpgrade')); end if con.Version <= 1, % Upgarde from version 1 to version 2 structure. % % Version: 1 % Constraints: {} % Not: 0 % Op: 'and' % conbase: [1x1 conbase] % Partial increment of the version number: con.Version = 1.5; end if isstruct( con ), % Convert the structure to an object. con = conboolean( con ); end %------------------------------------------------------------------------------| % EOF %------------------------------------------------------------------------------|