Documentation

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.

addCursor

Add cursor to display

Syntax

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

Description

example

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.

Examples

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
    scope(ii,10*ii,20*ii);
end

Add Cursor

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

  struct with fields:

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

Modify Cursor

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

Remove Cursor

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

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?