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

mod (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the basic class.

Syntax

c = mod(a, b)

Description

Computes the modulo of the input elements.

Details

Examples

Inputs

Name Description
a Specifies the dividend. a is a matrix.
b Specifies the divisor. b is a matrix.

Outputs

Name Description
c Returns the modulo of a and b. c has the same sign as b. c is a matrix of the same size as the larger of a and b.

Details

LabVIEW computes the modulo using the following equation: mod(a, b) = a-b.*floor(a./b). If b is 1 and a is positive, mod(a, 1) is the fractional part of a. If the input elements have the same sign, mod(a, b) is equivalent to rem(a, b).

Examples

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

Related Topics

rem


Resources


 

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