Product Documentation
Virtuoso Visualization and Analysis XL SKILL Reference
Product Version IC23.1, November 2023

awvGetScalarFromWave

awvGetScalarFromWave(
o_waveform
)
=> n_yVale / o_waveform

Description

Returns the y-axis value of the point when the input waveform is a single point. If the waveform has multiple points, the function returns back the input waveform.

Arguments

o_waveform

The waveform whose scalar value is to be returned.

Value Returned

n_yValue

Y-axis value of the point in a single-point waveform.

o_waveform

Waveform ID of the input waveform if it has multiple points.

Examples

The following example creates a single-point waveform wave.

xVec=drCreateVec('double 10)
=> srrVec:0x360c77a0
yVec=drCreateVec('double 10)
=> srrVec:0x360c77b0
drSetElem(xVec 0 10)
=> t
drSetElem(yVec 0 10)
=> t
wave=drCreateWaveform(xVec yVec)
=> srrWave:0x3603d200

The following example returns the scalar value of the single-point waveform wave.

awvGetScalarFromWave(wave)
=> 10.0

The following example creates a waveform that has multiple points.

xVec=drCreateVec('double 10)
yVec=drCreateVec('double 10)
for(i 1 10
 drSetElem(xVec i i)
 drSetElem(yVec i i*i-19*1+100)
)
=> srrVec:0x360c7af0
=> srrVec:0x360c7b00
=> t
wave=drCreateWaveform(xVec yVec)
=> srrWave:0x3603d2b0

When you run the function awvGetScalarFromWave on the waveform wave, the function returns ID of the waveform.

awvGetScalarFromWave(wave)
=> srrWave:0x3603d2b0

Return to top
 ⠀
X