Owning Class: basic
Requires: MathScript RT Module
c = mod(a, b)
Computes the modulo of the input elements.
|a||Specifies the dividend. a is a scalar, vector, or matrix of real numbers.|
|b||Specifies the divisor. b is a scalar, vector, or matrix of real numbers.|
|c||Returns the modulo of a and b. c has the same sign as b. c is a matrix of the same size as the larger of a and b.|
LabVIEW computes the modulo using the following equation: mod(a, b) = a-b.*floor(a./b). If b is 1 and a is positive, mod(a, 1) is the fractional part of a. If the input elements have the same sign, mod(a, b) is equivalent to rem(a, b).
The following table lists the support characteristics of this function.
|Supported in the LabVIEW Run-Time Engine||Yes|
|Supported on RT targets||Yes|
|Suitable for bounded execution times on RT||Yes|
A = [1:1:5]
B = 3
C = mod(A, B)