Modulo
This block implements the remainder after the division function. The block provides two options: Modulo and Remainder. Modulo(u1,u2) returns u1-floor(u1/u2)*u2 and Remainder(u1,u2) returns u1-int(u1/u2)*u2
Library
MathOperations
Description
The Modulo block implements the remainder after the division function.
The block provides two options: Modulo and Remainder. Modulo(u1,u2) returns u1-floor(u1/u2)*u2 and Remainder(u1,u2) returns u1-int(u1/u2)*u2.
When u2 is 0, the output is considered to be u1.
The input datatype should be either double or integer.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
op | Function | String | 'Modulo' | |
zc | Apply zero crossing | Enables the detection of zero crossings. | Scalar | 0 |
externalActivation | External activation | Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | output | 1 | |
Port 2 | explicit | The input data to be divided. | input | 1 |
Port 3 | explicit | The divisor. | input | 2 |
Port 4 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | Standard mode is used. |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |