www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@mdevtestplan/responseNames.m
function T = responseNames(T,newNames) %responseNames response names in template models % resp = responseNames(T) % T = responseNames(T,NewResp) % Copyright 2014-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin==1 respNames = cell(1,length(T.Responses)); for i=1:length(T.Responses) respNames{i} = varname(T.Responses{i}); end T = respNames; else respNames = responseNames(T); if ~isequal(respNames(:),newNames(:)) % responses have changed from template mdl = HSModel(T.DesignDev); Responses = cell(1,length(newNames)); for i=1:length(newNames) % change to default model from test plan template if changed Responses{i} = setResponse(mdl,newNames{i}); end T.Responses=Responses; end end