gcd (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

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

文章是否对您有帮助?

没有帮助