www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgsumconstraint/getComparisonOperator.m

    function comp = getComparisonOperator(obj)
%GETCOMPARISONOPERATOR Return the comparison operator string
%
%  GETCOMPARISONOPERATOR(OBJ) returns a string indicating what type of
%  comparison is applied between the left and right-hand sides of the
%  constraint.  This string will be one of '<=', '>=' or '=='.

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


switch func2str(obj.CompOperator)
    case 'le'
        comp = '<=';
    case 'ge'
        comp = '>=';
    case 'eq'
        comp = '==';
    otherwise
        comp = '<=';
end