modifyCursor
Modify properties of Logic Analyzer cursor
Description
Examples
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
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 Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
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, color name, or
color short name:
Color Name | Short Name | RGB Triplet | Appearance |
---|---|---|---|
"red" | "r" | [1 0 0] |
|
"green" | "g" | [0 1 0] |
|
"blue" | "b" | [0 0 1] |
|
"cyan"
| "c" | [0 1 1] |
|
"magenta" | "m" | [1 0 1] |
|
"yellow" | "y" | [1 1 0] |
|
"black" | "k" | [0 0 0] |
|
"white" | "w" | [1 1 1] |
|
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
Version History
Introduced in R2013a
See Also
dsp.LogicAnalyzer
| addCursor
| deleteCursor
| getCursorTags
| getCursorInfo
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- 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)