www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimstore/getHelperDataset.m
function data = getHelperDataset(optimstore, datasetname, varargin) %GETHELPERDATASET Retrieve data from a helper data set % PTS = GETHELPERDATASET(OPTIMSTORE, DATASETNAME) returns all the data % from the specified helper data set. If the dataset cannot be found, % DATA is returned as empty. % % PTS = GETHELPERDATASET(OPTIMSTORE, DATASETNAME, INPUTNAMES) returns % data from the specified helper data set. Data is retrieved for the % columns of the data set with names that match those in INPUTNAMES. If % the dataset cannot be found, DATA is returned as empty. % % See also: CGOPTIMSTORE/GETHELPERDATASETSIZE. % Copyright 2005-2009 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin < 3 opts = getOptimOptions(optimstore.OptimRunner,'full'); info = getOperatingPointSets(opts); c = struct2cell(info); idx = strcmp(datasetname, c(1, :)); if isempty(idx) error(message('mbc:cgoptimstore:InvalidArgument5')); end inputNames = info(idx).vars; else inputNames = varargin{1}; end data = getDatasetValues(optimstore.OptimRunner, inputNames, datasetname);