Search

Module: Editor

Version: 2.2.1 +

Type: Long, Double, String or Date

Category: Matrix

 

Description

The formula 'Replace' replaces old values in a matrix for new values. Only the values that equals the search value will be changed. The other values remain the same.

Parameters

Matrix:

This is the matrix of type long, double, string or date where the formula 'Replace' will be used.

Old_Value:

This is the search value.

New_Value:

This is the value that replaces the Old_Value.

Example

Description

In the following example you will see a DataTable where the function ‘ Replace’ is used. In the first matrix you see a number of values. Beneath the matrix you see the text: Old_Value: and New_Value. This means that in the matrix the old value will be replaced by the new value as you can see in the result matrix.

Values parameters

Input:

IndexColumn 0Column 1Column 2
0 2 0 0
1 0 2 0
2 0 0 2
Old_Value:

2

New_Value:

8

Result

Output:

IndexColumn 0Column 1Column 2
0 8 0 0
1 0 8 0
2 0 0 8

Related Topics

- DataTable: A DataTable consists of a number of rows and columns which can be set in the Editor after which it can be filled with values of a certain type, like numbers, dates or texts.

Updated: 2013-10-18