getCursorInfo
Return settings for Logic Analyzer cursor
Description
returns the settings for the cursor or cursors specified by the input tag.cursorInfo
= getCursorInfo(scope
,'CursorTag',tag
)
Examples
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
Add a cursor at 15 seconds and show the cursor information.
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
Change the cursor color to magenta.
hide(scope) modifyCursor(scope,cursor,'Color','Magenta') show(scope)
Remove Cursor
Delete the yellow cursor at 0
seconds.
hide(scope) tags = getCursorTags(scope); deleteCursor(scope,tags{1}); show(scope)
Input Arguments
scope
— The Logic Analyzer object from which you want to return cursor settings
dsp.LogicAnalyzer
object
The Logic Analyzer object from which you want to return cursor settings, specified as a handle to the
dsp.LogicAnalyzer
object.
tag
— identifying tag or tags
character vector | string scalar | cell array of character vectors | string array
The tag or tags identifying the cursor or cursors about which to get information, specified as the randomly assigned cursor tag or tags.
Example: 'C5'
Example: {'C4','C5'}
Example: ["C4","C5"]
Data Types: char
| cell
| string
Output Arguments
cursorInfo
— Information about settings for the cursor or cursors
struct
The cursorInfo
struct contains the following fields:
Location
— Location of the cursorsColor
— Color of the cursorsLocked
— Locked status of the cursorsTag
— Tag identifying cursors
Version History
Introduced in R2013a
See Also
dsp.LogicAnalyzer
| getCursorTags
| modifyCursor
| getDisplayChannelInfo
Apri esempio
Si dispone di una versione modificata di questo esempio. Desideri aprire questo esempio con le tue modifiche?
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)