Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

rem (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

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

Examples

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

Related Topics

mod


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit