YatX
YatX('Expression','X','Continuous'=FALSE)
Arguments
|
'Expression' |
Signal or expression |
|
'X' |
Position at which to read the value; given in x-axis units, e.g. s or m |
|
'Continuous' |
Optional parameter for permitting variable values of 'X' |
Description
This function returns the Y-value of 'Expression' at position 'X' on the x-axis. You can use this function for time based signals as well as for length based signals.
In default mode, the 'Continuous' parameter is not set (or FALSE or 0). Then the function expects a constant x-value and returns a constant y-value.
The 'X' parameter can also be variable, i.e. it can be a function itself. In this case, you have to activate the continuous mode by setting the 'Continuous' parameter to TRUE or 1. The function then determines the suitable y-value for every value of 'X'.
SetYatX
SetYatX('Expression','SampleValue','X')
Arguments
|
'Expression' |
Signal or expression to change |
|
'SampleValue' |
Value to insert at the position 'X' |
|
'X' |
x-position where to insert the value 'SampleValue' ; given in x-axis units, e.g. s or m |
Description
Using this function, you can create a copy of a signal in which a value has been changed. As a result, the function provides a copy of the signal 'Expression' where the value 'SampleValue' was inserted at the position 'X'.
You can also use this function to insert text.
The function behaves differently depending on whether it is applied to an equidistant signal. In the case of equidistant signals, a distinction is made between the following cases:
-
If 'X' is smaller than the offset of the signal, the signal is returned unchanged.
-
If 'X' corresponds to the size of the signal (see XSize) plus the sampling size, the signal is extended to include a sample with the value 'SampleValue'.
-
In all other cases, the new value is inserted at the position 'X' or at the next smaller sample position.
For non-equidistant signals, the function replaces the value at the position 'X', if present, or inserts a new sample.