Section: Elementary Functions
y = ceil(x)
where x is a multidimensional array of numerical type. The ceil
function preserves the type of the argument. So integer arguments
are not modified, and float arrays return float arrays as
outputs, and similarly for double arrays. The ceil function
is not defined for complex or dcomplex types.
ceil function applied to various
(numerical) arguments. For integer arguments, the ceil function has
no effect:
--> ceil(3) ans = 3 --> ceil(-3) ans = -3 --> quit
Next, we take the ceil of a floating point value:
--> ceil(3.023f) ans = 4 --> ceil(-2.341f) ans = -2 --> quit
Note that the return type is a float also. Finally, for a double
type:
--> ceil(4.312) ans = 5 --> ceil(-5.32) ans = -5 --> quit