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.

addWave

Add wave corresponding to specified input

Syntax

waveTag = addWave(scope)
waveTag = addWave(scope,Name,Value)

Description

example

waveTag = addWave(scope) adds a wave to the display. A tag value is returned, which can be used to modify and delete the wave.

waveTag = addWave(scope,Name,Value) sets properties using one or more name-value pairs. Enclose each property name in single quotes.

Examples

collapse all

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

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

duplicateWave = addWave(scope,'InputChannel',2,'Name','Waves Digital','Format','Digital',...
    'Height',30,'DisplayChannel',3);
%getDisplayChannelInfo(scope,duplicateWave)

Remove Dividers

deleteDisplayChannel(scope,digitalDividerTag)
deleteDisplayChannel(scope,analogDividerTag)

Clear variables

clear analogDividerTag cosValVec cosValVecOffset count digitalDividerTag duplicateWave scope sinValVec stop tags

Input Arguments

collapse all

Example: 'addWave(scope)' adds a wave 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: 'InputChannel',2,'Color','Blue' specifies that a wave should be added to input channel 1 and colored blue.

collapse all

Color of the wave, specified as an [R G B] value or one of the following:

  • 'Black'

  • 'Blue'

  • 'Cyan'

  • 'Default'

  • 'Green'

  • 'Magenta'

  • 'Red'

  • 'White'

  • 'Yellow'

When you choose 'Default', the value of the DisplayChannelColor property in the Logic Analyzer is used.

Example: 'Color','Blue'

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

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

Specify as a scalar numeric value the display channel that shows this wave. By default, the wave is added to the end of the display.

Example: 'DisplayChannel',2

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

Specify as a scalar nonnegative integer the font size in points. When you choose 0, the value of the DisplayChannelFontSize property in the Logic Analyzer is used.

Example: 'FontSize',8

Data Types: double

'Format' must be one of the following.

  • 'Analog'

  • 'Default'

  • 'Digital'

When you choose 'Default', the value of the DisplayChannelFormat property in the Logic Analyzer is used.

Example: 'Format','Digital'

Data Types: char

Specify as a scalar integer the height of the wave in the display in units of 16 pixels. When you choose 0, the value of the DisplayChannelHeight property in the Logic Analyzer is used.

Example: 'Height',2

Data Types: double

This property specifies the input channel whose data is used for this wave. By default, it will connect the first input to this wave.

Example: 'InputChannel',2

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

Specify as a character vector the name that you would like to set for the new wave.

Example: 'Name','MyWave'

Data Types: char

'Radix' must be one of the following.

  • 'Binary'

  • 'Default'

  • 'Hexadecimal'

  • 'Octal'

  • 'Signed decimal'

  • 'Unsigned decimal'

When the input signals are of class double, single, or logical, you should not set this property. When you choose 'Default', the value of the DisplayChannelRadix property in the Logic Analyzer is used.

Example: 'Radix','Hexadecimal'

Data Types: char

Output Arguments

collapse all

A tag for the newly added wave. Use the tag name to modify and delete the wave.

Introduced in R2013a

Was this topic helpful?