Previous Page | Next Page

Language Reference

ABS Function

ABS( matrix ) ;

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 23.31 Absolute Values
a
2 1 0 1 2

Previous Page | Next Page | Top of Page