www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@sweepsetfilter/addSweepNote.m

    function obj = addSweepNote(obj, noteExp, noteString, noteColor)
%ADDSWEEPNOTE  Add a sweep note
%
%  SSF = ADDSWEEPNOTE(SSF, EXPRESSION, NOTE, COLOR) adds a sweep note.

%  Copyright 2000-2005 The MathWorks, Inc. and Ford Global Technologies, Inc.

if nargin<3
    noteString = '';
end
if nargin < 4 || ~isnumeric(noteColor) || ~isequal(size(noteColor), [1 3])
    noteColor = [1 0 0];
end

% Parse the string into the internal format
obj.sweepNotes(end+1) = parseNoteString(noteExp, noteString, noteColor);

% Update the sweep note cache
obj = updateSweepNotes(obj, [], length(obj.sweepNotes));