www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregusermod/rfnames.m
function [rnames,defs] = rfnames(U) %RFNAMES Response feature names % % [RFNAMES, DEFVALUES] = RFNAMES(M) returns the response feature names % from the user-defined model. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. try [rnames,defs] = feval(U.funcName,U,'rfnames'); if ~isempty(rnames) && ~iscellstr(rnames) error(message('mbc:xregusermod:InvalidValue7', name( U ))) end if ~isempty(defs) && (~isnumeric(defs) || any(defs~=fix(defs)) || any(defs<1)) error(message('mbc:xregusermod:InvalidValue8', name( U ))) end catch ME if ~strcmp(ME.identifier,'MATLAB:UndefinedFunction') || isempty(strfind(ME.message,'i_rfnames')) % It is permissible not to define rfnames in the MATLAB file ReportError(U,ME) end rnames = []; defs = []; end if isempty(rnames); rf = rfvals(U); rnames = cell(1, length(rf)); for i=1:length(rf) rnames{i} = sprintf('RF_%d',i); end defs = []; end if isempty(defs) defs = 1:numParams(U); end