HyperMath

Mod

Mod

Previous topic Next topic No expanding text in this topic  

Mod

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

The modulus function.

Syntax

Y = Mod(X,M)

Argument

Name

Description

 

X

A real scalar, vector or matrix.

 

M

The modulus values. A real scalar, vector or matrix that has the same dimensions as X.

Output

Name

Description

 

Y

When X is a matrix the result is X–M.*Floor(X./M).

Example

Find the value of 5.3, modulus 2.

 

Syntax

 

Y = Mod(5.3, 2)

 

Result

 

Y = 1.3

See Also:

Fix

Mod

Rem

Sign