auto_xy_SubΒΆ
auto_xy_Sub creates a new dataset by subtracting the y coordinates of the given 2D datasets.
- hDataNew = auto_xy_Sub(hData, hvData)
- hDataNew = auto_xy_Sub(hData_Layer, hvData)
Return Value
hDataNew is the handle of the new dataset.
Parameters
- hData
hData is the handle of a 2D dataset. The new dataset hDataNew will be added to the layer (diagram) in which the dataset hData is located.
- hData_Layer
hData_Layer is a vector with one or two elements:
Value
Meaning
hData_Layer[1]
Handle of a dataset. The new dataset is added to the diagram to which the dataset hData_Layer[1] belongs.
hData_Layer[1, 2]
The first element is the handle of a dataset and the second element is the handle of diagram (layer). The new dataset is added to the diagram with the handle hData_Layer[2].
- hvData
hvData is a vector of handles of 2D Datasets.
Comment
The x coordinates of all given datasets must be strictly increasing The x coordinates of the given datasets do not have to be identical.
The new dataset is calculated as following:
The x-range is calculated where all datasets overlap.
The the new x-range a new x-coordinate vector (xs) is calculated which contain the x-coordinates of all given datasets.
The y-coordinates for each datasets for the new x-vector xs is calculated by linear interpolation.
The interpolated y-coordinates are subtracted (ysub = Y1 - (Y2+Y3+..)).
A new dataset will be created (xs, ysub).
See also
id-120110