Main Content


Modify properties of Logic Analyzer cursor



modifyCursor(scope,tag) modifies the properties of the Logic Analyzer cursor specified by the input tag.

modifyCursor(scope,tag,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

The Logic Analyzer object for which you want to modify a cursor specified, as a handle to the dsp.LogicAnalyzer object.

The tag identifying which cursor to modify specified.

Example: modifyCursor(scope,'C4') modifies a cursor in Logic Analyzer.

Example: modifyCursor(scope,"C4") modifies a cursor in Logic Analyzer.

Data Types: char | string

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 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.

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

  • 'Black'

  • 'Blue'

  • 'Cyan'

  • 'Green'

  • 'Magenta'

  • 'White'

  • 'Yellow'

For more information, see ColorSpec (Color Specification).

Example: 'Color','Blue'

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

Data Types: char | string | double | single | uint8 | uint16 | uint32 | uint64 | int8 | int16 | int32 | int64

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 location cannot be changed. Logic Analyzer denotes the locked cursor by assigning a default color of gray. This color cannot be changed.

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

Example: 'Locked',true

Introduced in R2013a