Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Unknown macro: {alias}

Name

div — Divide a constant value into a dataset or divide a dataset by another

Syntax

div hi hiname ;# divide active dataset by workspace hiname dataset, result in hiname.

div lo hiname ;# divide active dataset by workspace hiname dataset, result in active.

div value ;# divide value into active dataset, result in active data.

div x | y | sca value ;# divide value into x or y or scalar coordinates.

div x | y | z | sca [value] xx | yy | zz | sca [factor] ;# divide data coordinates by each other.

Description

The div command will divide a constant value with a dataset or divide two datasets by each other. div works on grid and polydata type of dataset. The result dataset is changed. Dividing by zero will be bypassed.

  • Grid: The two datasets must have the same grid dimensions.
  • Polydata: The two datasets must have the same number of points. For polydata the target for the divide operation can be any of the xyz coordinates and scalar values.
  • Dividing a datasets by another: The dataset in active is divided by 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.

Tip

The command Function is an alternative for mathematical operations on single datasets. Look inside the Geocap Toolbox for commands.

Arguments

hi hiname

lo hiname

value

hi | lo hiname tes

x | y | sca value

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

Examples

Ex.1: Divide a dataset with another

# Divide a grid in active with a grid in workspace named mygrid and place the result in active
div lo mygrid

Ex.2: Divide a dataset with a value

# Divide the value 15 with a dataset in active
div 15

Ex.3: Divide coordinates

# Divide x by y data coordinates and place the result in x data coordinates.
div x yy

See also

add - Add to dataset, sub - Subtract operation, mul - Multiply operation

  • No labels