R: MATLAB mod/rem functions

mod {matlab} | R Documentation

## 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)

P. Roebuck proebuck@mdanderson.org

### 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)

[Package matlab version 1.0.2 Index]