Divide by Constant and Round
R2026bDivide input by a constant and round to integer
Libraries:
Fixed-Point Designer
Description
The Divide by Constant and Round block outputs the result of dividing the input by a constant and rounds the result to an integer using the specified rounding method.
The Divide by Constant and Round block uses an algorithm that is functionally similar to the Granlund-Montgomery-Warren Method. The division operation is computed via a multiplication by inverse, which generally results in better performance on embedded systems.
Ports
Input
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"embeddedMathLib/Divide by Constant and Round"
Example: add_block("embeddedMathLib/Divide by Constant and Round","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2021a
