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

    function [Status, Message] = checkSetup(obj)
%CHECKINPUTSIZES Check whether the object's settings are acceptable
%
%  [STATUS, MESSAGE] = CHECKSETUP(OBJ) checks that the object's settings
%  are acceptable.  STATUS is an integer code that indicates whether that
%  input is acceptable.  A status of 0 indicates no problem, 1 indicates a
%  warning issue and 2 indicates an critical problem.  MESSAGE is a string
%  that describes the overall problem and should be non-empty whenever the
%  status code is greater than 0.

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


if ~isvalid(obj.Expression)
    Status = 2;
    Message = 'No objective model has been selected';
else
    Status = 0;
    Message = '';
end