Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

add — Add a constant value to the z coordinate of a dataset or add the z coordinates of two datasets together

Syntax

...

The add command will add a constant value to a dataset or add two datasets together. The add command works on grid, cube and polydata type of dataset. The result dataset is changed.

  • Grid added to grid: The two datasets should preferably have the same grid dimensions. If not the active dataset is regridded to match the window and resolution of the hiname grid. A warning is issued in the message area.
  • Cube added to cube: The two datasets must have the same grid cube dimensions.  
  • Polydata added to polydata: The two datasets must have the same number of points. For polydata the target for the adding operation can be any of the xyz coordinates and scalar values.
  • Adding two datasets together: The dataset in active is added to the dataset in hiname. The result data is placed in active if the lo argument is used, and in the workspace hiname if the hi argument is used.

...

Add dataset in active and hiname and the result data will be placed in active workspace.

value

Add value and result data will be placed in the active workspace. The dataset can be of any kind.

hi | lo hiname tes

Add two poly dataset together according to rules above and optionally test using the tes argument if xy coordinates are equal and then add only for equal coordinates.

x | y | sca value

Add value to x- or y- or scalar coordinates. The result data will be placed in the active workspace.

x | y | z | sca [value] xx | yy | zz [factor]

Add value to x or y or scalar coordinates. The result data will be placed in the active workspace. Add data coordinate axes together. Optionally use a value that will be added to the coordinates and/or a factor that will be multiplied with the coordinates. x | y | z |sca represents the first data coordinates and xx | yy | zz represents the second data coordinates. The result is always placed in the first coordinates.

Examples

Ex.1: Add a value to a dataset

...

sub - Subtract operation, mul - Multiply operation, div - Divide operation