@f{xyinterpol}¶
Displays the interpolated y-coordinate for a given x-coordinate or the x-coordinate for a given y-coordinate of a 1D or 2D dataset.
- @f{xyinterpol(datasetname, Value)}
- @f{xyinterpol(dataset, Value, format)}
- @f{xyinterpol(dataset, Value, format, i_intersect)}
- @f{xyinterpol(dataset, Value, format, i_intersect, default_return)}
Parameters
Parameter
- dataset
Specifies the 1D or 2D dataset. Can be one of the following values:
Value
Description
Dataset name
Is the name of the dataset, e.g. Data1.
Index of the dataset
Is the index. The first dataset in the layer has the index 1.
Layer name:Index of the dataset
If the layer name is given, the field function can be in a text object owned by a differen layer, e.g. Diagram1:1.
- Value
Is the value of a coordinate. The value can start with
x=
ory=
. Default isx=
. This parameter supports nested field function as show below. The nested field function should be called without the ‘@f{}’. In the following example we find the x-position of the maximum of y for Data2, and compute the value of Data1 at this x position.@f{xyinterpol(Data1,x=xystatvalue(Data2, ymaxpos))}
- format
Specifies the number format. The default format is %g. Example: %.3lf will print the values with 3 decimal places. For a complete description see printf. In field functions commas are not allowed inside the format string.
- i_intersect
If more than one intersection exists with the dataset, the index of the intersection can be specified. Negative values count from the end. Default value is 1.
- default_return
Sets the default return value, if the dataset has no intersection or the dataset is not found. Default value is
----
.
Example
Example 1
@f{xyinterpol(Data1, y=54.21)}
Power at 2100 rpm: @f{xyinterpol(Data1, x=2100, %.2lf kW)}
Power at 2100 rpm: @f{xyinterpol(Diagram1:1, 2100, %.2lf kW, 1)}
Output 1:
2100
Power at 2100 rpm: 54.21 kW
Power at 2100 rpm: 54.21 kW
Example 2
X postion of Ymax of Data2 (@l{1.2,0,8,255,0,0}) --> @f{xystatvalue(Data2, ymaxpos,%.1f)}s
Y value of Data1 (@l{1.2,0,8,0,0,255}) at @f{xystatvalue(Data2, ymaxpos,%.1f)}s --> @f{xyinterpol(Data1,x=xystatvalue(Data2, ymaxpos),%.1f)} N.m
.
Output 2

History
Version |
Description |
---|---|
R2025.2 |
Value parameter supports nested field function. |
R2022.4 |
The ‘x=’ now works even if x-axis is not time based. The “y=” request also works. |
R2012.13 |
Error in parameter i_intersect fixed. |
5.15.0 |
New. |
See also
Overview Field Functions, Edit=>Update Fields, Diagram=>Insert Field Function, DT_Format, printf, @f{xyvalue}
id-469470