www.gusucode.com > mbcexpr 工具箱 matlab 源码程序 > mbcexpr/@cgexprgroup/removeOutput.m
function obj = removeOutput(obj, remIdx) %REMOVEOUTPUT Remove outputs from the expression chain % % OBJ = REMOVEOUTPUT(OBJ, REMIDX) removes the expressions that are at the % locations in the static expression chain specified by REMIDX from the % output list. % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. % Remove indices from list toRem = ismember(obj.Outports, remIdx); obj.Outports(toRem) = []; obj.OutportRequiredIndices(toRem) = []; % Recalculate the maximum usage point for these so that values are % correctly cleaned up to minimise memory numExpr = length(obj.ExprArray); for n = remIdx for k = numExpr:-1:1 if any(n==obj.InputIndices{k}) obj.MaxIndices(n) = k; break end end end