floor

Returns the largest integer that is not greater than x.

Syntax

R = floor(x)

Inputs

x
Any valid scalar | vector | matrix.
Type: double | integer | logical | struct | cell
Dimension: scalar | vector | matrix

Outputs

R
Resulting scalar | matrix.

Examples

A simple floor example:

R = floor(0.9)
R = floor(-0.1)
R = 0
R = -1

Multiple simple inputs:

R = floor([0.9,-0.1])
R = floor([0.9,-0.1,0.9i,-0.1i])
R = [ 0 -1 ]
R = [ 0, -1, 0,  - i]