www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimitem/cgoptimitem.m
function obj = cgoptimitem(name) %CGOPTIMITEM Construct a new cgoptimitem % % OBJ = CGOPTIMITEM(NAME) creates a new cgoptimitem with the given name. % This class is the base class to the objectives and constraints that are % use in cgoptim. % Copyright 2005 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin && isstruct(name) s = name; else if nargin<1 name = 'Optimization Item'; end s = struct('Name', name, ... 'ScaleOutput', true, ... 'IsStatic', false, ... 'StaticData', struct, ... 'Version', 1); end obj = class(s, 'cgoptimitem');