Scripting > Math Functions


Replace Specific Values

replaceSpecificValues(HecDouble from, HecDouble to)

 

Replace specific values for another in the time series.

 

The function searches through the time series array and replaces values that match the "from" value with the "to" value. HecDouble controls the precision to which the value is compared (e.g., 12.345 is to three places after the decimal).

 

Parameters: from value which will be replaced to value with which to replace with

Example: newDataSet = dataset.replaceSpecificValues(HecDouble from, HecDouble to)

Returns:  a copy of the current time series with the specific values replaced.