Scripting > Math Functions


Subtract a Data Set

subtract(TimeSeriesMath tsData)

 

Subtract the values in the data set tsData from the values in the current data set.  Both data sets must be time series data set. 

When subtracting one time series data set from another, there is no restriction that times in the two data sets match exactly.  However, only values with coincident times will be subtracted.  Times in the current time series data set that cannot be matched with times in the second data set are set missing.  Values in the current data set that are missing are kept as missing.  Either or both data sets may be regular or irregular interval time series. 

 

See also:  subtract(floating-point constant)

Parameters:

tsData  - A TimeSeriesMath object.

Example: newDataSet = dataSet.subtract(otherDataSet)

Returns:  A new TimeSeriesMath object.