Command Reference : Function Reference : Function Reference: E
  
 
@erecode
Element by element recode of data objects.
Syntax: @erecode(m1, m2, m3)
m1: numeric object
m2: numeric or alphanumeric object
m3: numeric or alphanumeric object
Return: numeric or alphanumeric object
Returns the element recode using the conformable numeric condition object m1 and the matrices m2 and m3. If an element of m1 is non-zero, then assign the value using the corresponding element of m2, otherwise use the corresponding value of m3.
Examples
Let M1 be a matrix. Then
= @erecode(@egt(M1, 0), M1, na)
returns a matrix that is identical to M1 except that negative values are replaced with NAs.
Cross-references
See also @eeq.