int
Integer function.
Syntax
int(expr)
Argument
- expr
 - A valid scalar or vector expression.
 
Example
| Templex Expression | Result | 
|---|---|
{int(2.8)} | 
                                2 | 
                            
{int( {-1.1, 0.6, 1} )} | 
                                -2, 0, 1 | 
                            
{int( { {-1.1, 0.6}, {7.9, 11.3} }
                                    )} | 
                                {-2, 0}, {7, 11} | 
                            
Comments
The int function returns the greatest integer that is less than or equal to expr. If expr is a scalar, the result is a scalar less than or equal to expr.
If expr is a vector, the result is a vector of the same dimensions where each element is less than or equal to its corresponding element of expr.
If expr is a matrix, the result is a matrix of the same dimensions where each element is less than or equal to its corresponding element of expr.