auto_xyz_SubΒΆ

auto_xyz_Sub creates a new dataset by subtracting the z coordinates of the given 3D datasets.

hDataNew = auto_xyz_Sub(hData, hData2)
hDataNew = auto_xyz_Sub(hData_Layer, hData2)
hDataNew = auto_xyz_Sub(hData_Layer, hData2, nSourceType)

Return Value

hDataNew is the handle of the new 3D dataset.

Parameters

hData

hData is the first dataset handle. The new dataset (hData - hData2) will be added to the diagram of hData.

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 dataset handle and the second element is the diagram handle (layer). The new dataset is added to the diagram with the handle hData_Layer[2].
hData2

hData2 Is a second 3D dataset.

nSourceType

nSourceType is one of the following values:

Value Description
1 Use the x,y coordinates of dataset 1 to calculate the result.
2 Use the x,y coordinates of dataset 2 to calculate the result.
3 Use the interpolation matrix to calculate the result (Default)

For type 1 or 2 the z-coordinates for both datasets are calculated at the original x,y-coordinates and the results are added. For type 3 the interpolation matrix is calculated at identical x,y coordinates the than the matrices are added (Default).

If both maps have identical or quasi identical x,y-coordinates the types 1 or 2 will calculate a better result.

Comment

The two datasets can be created from a matrix or from XYZ triples. The new dataset is created as follows:

  • The overlapping area in the x,y plane of the two datasets is calculated.
  • For the overlapping area for each dataset, a new matrix is interpolated. The two new matrices have the same number of rows and columns.
  • The operation is performed elementwise on the new interpolated matrices.
  • The new dataset is created from the result matrix. The hull is taken from the first dataset.

Example

hPage = auto_LoadTemplate("test.ipw")
ssFile1  =  auto_ImportData(GetRootDirectory() + "samples/test1.xls")
hData1 = auto_LoadDataset("Diagram1", "EngSpd", "PME", "TOEL1");
ssFile2  =  auto_ImportData(GetRootDirectory() + "samples/test2.xls")
hData2 = auto_LoadDataset("Diagram2", "EngSpd", "PME", "TOEL1");
hLayer = PageGetLayerHandle(hPage, "Diagram3");
hDataNew  =  auto_xyz_Sub([hData1, hLayer], hData2);
PageReplot(hPage);

History

Version Description
5.40.0 New parameter nSourceType.

id-385380