From 7:00 PM CST Friday, January 24th - 7:00 PM CST Sunday, January 26th, ni.com will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

rem (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: basic

Requires: MathScript RT Module

Syntax

c = rem(a, b)

Description

Computes the remainder of the input elements.

Details

Examples

Inputs

Name Description
a Specifies the dividend. a is a real scalar, vector, or matrix.
b Specifies the divisor. b is a real scalar, vector, or matrix.

Outputs

Name Description
c Returns the remainder of a divided by b. c has the same sign as a. c is a matrix of the same size as a or b.

Details

LabVIEW computes the remainder using the following equation: rem(a, b) = a-fix(a./b).*b. If the input elements have the same sign, rem(a, b) is equivalent to mod(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

Examples

A = [1:1:5]
B = 3
C = rem(A, B)

Related Topics

mod

WAS THIS ARTICLE HELPFUL?

Not Helpful