Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

gcd (MathScript RT Module Function)

LabVIEW 2011 MathScript RT Module Help

Edition Date: June 2011

Part Number: 373123B-01

»View Product Info

Owning Class: basic

Requires: MathScript RT Module

Syntax

c = gcd(a, b)

[c, d, e] = gcd(a, b)

Description

Computes the pairwise greatest common divisor of the input elements.

Examples

Inputs

Name Description
a Specifies a scalar or matrix. All elements of a must be positive integers.
b Specifies a scalar or matrix of the same size as a. All elements of b must be positive integers.

Outputs

Name Description
c Returns the greatest common divisor of a and b. c is a matrix of the same size as a or b.
d Returns a matrix of the same size as a or b such that c = a.*d+b.*e.
e Returns a matrix of the same size as a or b such that c = a.*d+b.*e.

Details

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 Not characterized

Examples

A = 234
B = 98
C = gcd(A, B)

Related Topics

lcm


 

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