www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimextoptions/numOperatingPointSets.m
function [n, mn, mx] = numOperatingPointSets(opts) %NUMOPERATINGPOINTSETS Get number of operating point sets in optimization % % N = NUMOPERATINGPOINTSETS(OPTS) gets the number of operating point sets % that have been defined in the optimization options. % % [N, MIN, MAX] = NUMOPERATINGPOINTSETS(OPTS) also returns the minimum and maximum % number of items that are allowed. % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. n = length(getOperatingPointSets(opts)); if nargout>1 mode = getOperatingPointsMode(opts); if strcmp(mode, 'any'); mn = 0; mx = realmax; elseif strcmp(mode, 'default') mn = 0; mx = 1; else mn = n; mx = n; end end