www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@sweepsetfilter/addVariable.m
function obj = addVariable(obj, varString, varUnit) %ADDVARIABLE Add a user-defined variable % % SSF = ADDVARIABLE(SSF, EQUATION, UNIT) adds a new variable to the that % is defined in terms of existing variables. % Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin < 3 varUnit = ''; end % Parse the string into the internal format obj.variables(end+1) = parseVariableString(varString, varUnit); % Update the object with the last variable obj = updatevariable(obj, [], length(obj.variables));