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

gcd (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 = 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.

Examples

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

Related Topics

lcm


Resources


 

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