www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimstore/pevEvaluate.m
function y = pevevaluate(optimstore, X, varargin) %PEVEVALUATE Evaluates prediction error variance (PEV) % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % WARNING: The evaluation of PEV is no longer supported in % % % cgoptimstore and this method will return PEV values of zero % % % (as detailed below) if called. % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Y = PEVEVALUATE(OPTIMSTORE, X) returns PEV values of zero for % optimization objectives/constraints at the free variable values X. X is % a (NPoints-by-NFreeVar) matrix where NPoints is the number of points to % be evaluated and NFreeVar is the number of free variables in the % optimization. % % Y = PEVEVALUATE(OPTIMSTORE, X, ITEMNAMES) returns PEV values of zero % for the objectives and constraints specified in the cell array of % strings, ITEMNAMES, at the free variable values X. Y is of size % (NPoints-by-NItems) where NItems is the number of objectives and % constraints listed in ITEMNAMES. % % Y = PEVEVALUATE(OPTIMSTORE, X, OBJCONNAME, DATASETNAME) returns PEV % values of zero for the objectives/constraints at the operating points % in the data set specified by the string DATASETNAME. % % Y = PEVEVALUATE(OPTIMSTORE, X, ITEMNAMES, DATASETNAME, ROWIND) returns % PEV values of zero for the specified objectives and constraints at the % points of DATASETNAME given by ROWIND. X must be a (NRows-by-NFreeVar) % matrix where NRows is the length of ROWIND. ROWIND must be a list of % integer indices in the range [1 NumRowsInDataset]. Y is a % (Nrows-by-NItems) matrix. % % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. % Tell the user that pevEvaluate is no longer supported warning(message('mbc:cgoptimstore:obsolete2')); % Get information about the objects for evaluation [unused, reqObj, reqNcon, reqLcon, unused, rowInd] = ... pPrepareEvaluate(optimstore, varargin{:}); % Ensure that the number of rows in X is the same as the length of the % number of row indices to be evaluated Npoints = size(X, 1); if nargin > 3 if length(rowInd) ~= Npoints error(message('mbc:cgoptimstore:InvalidArgument')); end end % As no longer supported, just return zeros of the required size if isempty(rowInd) NROW = size(X, 1); else NROW = length(rowInd); end NCOL = length(reqObj) + length(reqNcon) + length(reqLcon); y = zeros(NROW, NCOL);