www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@mbcinputfactor/copyinputs.m
function INP = copyinputs(INP1,INP2,CopyTargets) %COPYINPUTS % % INP2 = copyinputs(INP1,INP2) % Copyright 2007-2011 The MathWorks, Inc. if isempty(INP1) || (nargin>2 && CopyTargets) INP = INP2; else % targets are not copied from one input to another INP = INP2; for i=1:length(INP) if ~isequal(INP(i).pTarget,INP1(i).pTarget) INP(i).pDoUpdate = true; INP(i).Target = INP1(i).Target; end end end