Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mod

MATLAB mod/rem functions


Description

Provides modulus and remainder after division.

Usage

mod(x, y)
rem(x, y)

Arguments

x, y

numeric vectors or objects

Value

Returns vector containing result of the element by element operations.

Author(s)

Examples

## same results with x, y having the same sign
mod(5, 3)
rem(5, 3)
## same results with x, y having different signs
mod(-5, 3)
rem(-5, 3)

matlab

MATLAB emulation package

v1.0.2
Artistic-2.0
Authors
P. Roebuck
Initial release
2014-06-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.