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

fix returns an integer matrix made of nearest rounded integers toward zeros.

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
fix(pi)
Round a sparse single matrix toward zero.
S = sparse(single([1.2 0; -2.7 3.1]));
C = fix(S)
🔗See Also
floorroundceil
🕔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