Navigation: Language Reference > Functions > Arithmetic >
Y = trunc(X);
Rounds X or the elements of X towards zero (i.e. the function trunc removes the fraction).
X
trunc(X)
1
2.1
2
-2.6
-2
3.4
3
[1.1,-2.7;3.5,-4.1]
[1,-2;3,-4]
X and Y must have the same size.