www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimextoptions/getModeDescriptions.m
function desc = getModeDescriptions(obj) %GETMODEDESCRIPTIONS AGet string description for each mode setting % % GETMODEDESCRIPTIONS(OBJ) returns a (1-by-4) cell array containing a % description of the mode setting for each item in the optimization. The % contents of each cell are: % % Cell | Contents % ------+----------------------------------------- % 1 | Free variables mode % 2 | Objectives mode % 3 | Constraints mode % 4 | Operating point sets mode % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. desc = {'','','',''}; switch getFreeVariablesMode(obj); case 'any' desc{1} = 'any number'; case 'fixed' desc{1} = sprintf('%d', numVariables(obj)); end switch getObjectivesMode(obj); case 'any' desc{2} = 'any number'; case 'multiple' desc{2} = '2 or more'; case 'fixed' desc{2} = sprintf('%d', numObjectives(obj)); end switch getConstraintsMode(obj); case 'any' desc{3} = 'any number'; case 'fixed' desc{3} = sprintf('%d', numConstraints(obj)); end switch getOperatingPointsMode(obj); case 'default' desc{4} = '0 or 1'; case 'any' desc{4} = 'any number'; case 'fixed' desc{4} = sprintf('%d', numOperatingPointSets(obj)); end