This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Add cursor to display


cursorTag = addCursor(scope)
cursorTag = addCursor(scope,Name,Value)



cursorTag = addCursor(scope) adds in a cursor to the display. A tag value is returned, which can be used to modify and delete the cursor.

cursorTag = addCursor(scope,Name,Value) sets properties using one or more name-value pairs. Enclose each property name in single quotes.


collapse all

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

Add Cursor

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

  struct with fields:

    Location: 15
       Color: [0 1 1]
      Locked: 0
         Tag: 'C2'

Modify Cursor


Remove Cursor

tags = getCursorTags(scope);

Input Arguments

collapse all

Example: addCursor(scope) adds a cursor with the default characteristics.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'Location',2,'Color','Blue' specifies that a cursor should be moved to the 2-second mark and colored blue.

collapse all

Color of the cursor, specified as an [R G B] value or one of the following:

  • 'Black'

  • 'Blue'

  • 'Cyan'

  • 'Green'

  • 'Magenta'

  • 'White'

  • 'Yellow'

Example: 'Color','Blue'

Example: 'Color',[0,0,1]

Data Types: char | double

Specify as a numeric scalar value, in seconds, the cursor location.

Example: 'Location',1

Data Types: double

Locked status of the cursor, specified as false or true.

  • true — the cursor’s location cannot be changed. Logic Analyzer denotes this by assigning a default color of red.

  • false — the cursor’s location can be changed. Logic Analyzer denotes this by assigning a default color of yellow.

Example: 'Locked',true

Introduced in R2013a

Was this topic helpful?