Commands by Category:
Index:
Converts numbers to integers by truncating the fractional portion.
trunc
x (NxK matrix or N-dimensional array) – data
y (NxK matrix or N-dimensional array) – containing the truncated elements of x.
x = 100*rndn(2, 2); y = trunc(x);
If x equals:
-153.373 -1.972 109.412 127.732
then, y will equal:
-153.000 -1.000 109.000 127.000
See also
Functions ceil(), floor(), round()
ceil()
floor()
round()
previous
trimr
next
typecv