replaceVectorByEquality: REPLACE ITEMS OF VECTOR BY EQUALITY
Description
The function replces (or updates) the items of a given vector by
checking the equality with the target parameter. If found, the
item will be replaced by the value parameter. The length of
both target and value must be the same and could be
longer than 1, in which case the replace will be iterated.
Usage
replaceVectorByEquality(vector, target, value)
Arguments
vector
A vector to be replaced. The items of the vector must be
atom types, since the equality is checked by '=='.
target
targets to be replaced, could be either single or a
vector
value
values to be replaced at the positions of targets, must
be of the same length of target
Value
A vector of the same length as the parameter vector
Details
A warning will be prompted if any item in the target cannot be found