%% Modify Logic Analyzer Cursors Programmatically
% This example shows how to use functions to create, manipulate, and delete cursors in a dsp.LogicAnalyzer object.
%% Create Logic Analyzer and Signals

scope = dsp.LogicAnalyzer('NumInputPorts',3);
for ii = 1:20
    scope(ii,10*ii,20*ii);
end

%
%% Add Cursor

cursor = addCursor(scope,'Location',15,'Color','Cyan');
getCursorInfo(scope,cursor)

%
%% Modify Cursor

modifyCursor(scope,cursor,'Color','Magenta')

%
%% Remove Cursor

tags = getCursorTags(scope);
deleteCursor(scope,tags{1});

%
% Copyright 2012 The MathWorks, Inc.