ceil
Round up
📝Syntax
C = ceil(A)
📥Input Arguments
Parameter Description
A a variable
📤Output Arguments
Parameter Description
C result of ceil.
📄Description

ceil returns an integer or complex matrix made of rounded up elements.

Sparse single and sparse single complex inputs are supported. Only stored nonzero entries are rounded and the result keeps the sparse storage and the input precision.

💡Examples
ceil(pi)
Round a sparse single matrix upward.
S = sparse(single([1.2 0; -2.7 3.1]));
C = ceil(S)
🔗See Also
floorfixround
🕔Version History
Version Description
1.0.0 initial version
2.0.0 sparse single and sparse single complex inputs supported.
Edit this page on GitHub