www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptim/getnumrowsoppoint.m
function num_rows = getnumrowsoppoint(optim, datasetname) %GETNUMROWSOPPOINT Get number of rows in an operating point set % % num_rows = GETNUMROWSOPPOINT(optim, LABEL) returns the number of rows in % an input operating point set % Copyright 2000-2009 The MathWorks, Inc. and Ford Global Technologies, Inc. % start : a few sanity checks if isempty(optim.oppoints.Datasets) error(message('mbc:cgoptim:InvalidState9')); end if nargin > 1 dsind = getOperatingPointSetIndex(optim.OptimSetup, datasetname); if dsind==0 error(message('mbc:cgoptim:InvalidLabel4', datasetname)); end else dsind = 1; end % return the requested dataset datasetptr = optim.oppoints.Datasets(dsind); num_rows = datasetptr.get('numpoints');