addDivider
Add divider to Logic Analyzer
Description
adds a divider to the display. A tag value is returned, which can be used to modify
and delete the divider. dividerTag
= addDivider(scope
)
sets properties using one or more name-value pairs. Enclose each property name in
single quotes.dividerTag
= addDivider(scope
,Name,Value)
Examples
Manipulate Logic Analyzer Programmatically
Use functions to construct and manipulate a dsp.LogicAnalyzer System object.
Display Waves on Logic Analyzer scope.
scope = dsp.LogicAnalyzer('NumInputPorts',2); stop = 30; for count = 1:stop sinValVec = sin(count/stop*2*pi); cosValVec = cos(count/stop*2*pi); cosValVecOffset = cos((count+10)/stop*2*pi); scope([count (count-(stop/2))],[sinValVec cosValVec cosValVecOffset]) end
Reorganize Display
hide(scope) digitalDividerTag = addDivider(scope,'Name','Digital','Height',20); analogDividerTag = addDivider(scope,'Name','Analog','Height',40); tags = getDisplayChannelTags(scope); modifyDisplayChannel(scope,tags{1},'InputChannel',1,... 'Name','Ramp Digital','Height',40); modifyDisplayChannel(scope,tags{2},'InputChannel',2,... 'Name','Waves Analog','Format','Analog','Height',80); moveDisplayChannel(scope,digitalDividerTag,'DisplayChannel',1) moveDisplayChannel(scope,tags{2},'DisplayChannel',length(tags)) show(scope)
Duplicate Wave and Check Information
hide(scope) addWave(scope,'InputChannel',2,'Name','Waves Digital','Format','Digital',... 'Height',30,'DisplayChannel',3); show(scope)
Remove Dividers
hide(scope) deleteDisplayChannel(scope,digitalDividerTag) deleteDisplayChannel(scope,analogDividerTag) show(scope)
Clear variables
clear analogDividerTag cosValVec cosValVecOffset count digitalDividerTag duplicateWave scope sinValVec stop tags
Input Arguments
scope
— Logic Analyzer object
dsp.LogicAnalyzer object
dsp.LogicAnalyzer
object to which you want to add a divider.
Example: addDivider(scope)
adds a divider with the default characteristics.
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: 'DisplayChannel',2,'Name','MyDivider'
specifies that a divider should be added to display
channel 2 and named “MyDivider”.
DisplayChannel
— Channel on the display that shows this divider
NumInputPorts
(default) | scalar numeric value in the range (1,NumInputPorts
)
Specify as a scalar numeric value the display channel that shows this divider. By default, the divider is added to the end of the display.
Example: 'DisplayChannel',2
Data Types: double
| single
| uint8
| uint16
| uint32
| uint64
| int8
| int16
| int32
| int64
Height
— Height of the divider
0
(default) | scalar integer
Specify, in pixels, the height of the divider as a scalar integer in the range 8-200. If you choose 0, the
value of the DisplayChannelHeight
property in the Logic Analyzer is used.
Example: 'Height',2
Data Types: double
Name
— The name or label for the divider
''
(default) | character vector | string scalar
Specify the name that you would like to set for the new divider.
Example: 'Name','MyDivider'
Data Types: char
| string
Output Arguments
dividerTag
— tag for new divider
random character vector
A tag for the newly added divider. Use the tag name to modify and delete the divider.
Version History
Introduced in R2013a
See Also
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.
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)