Language Reference

ABS Function

ABS (matrix) ;

This function is supported by the IML procedure and the iml action.

The ABS function returns the absolute value of every element of the argument matrix, as shown in the following statements:

x = -2:2;
a = abs(x);
print a;

Figure 34: Absolute Values

a
21012


Last updated: May 07, 2026