gcd
Greatest common divisor
πŸ“Syntax
G = gcd(A, B)
πŸ“₯Input Arguments
Parameter Description
A a scalar, vector, or matrix of real integer values.
B a scalar, vector, or matrix of real integer values.
πŸ“€Output Arguments
Parameter Description
G result of gcd function (Greatest common divisor).
πŸ“„Description

G = gcd(A, B) computes the greatest common divisor using the Euclidian algorithm.

πŸ’‘Examples
A = [-5 7; 10 0];
B = [-15 3; 50 0];
G = gcd(A, B)
πŸ”—See Also
gamma
πŸ“šBibliography
Knuth, D. β€œAlgorithms A and X.” The Art of Computer Programming, Vol. 2, Section 4.5.2. Reading, MA: Addison-Wesley, 1973.
πŸ•”Version History
Version Description
1.0.0 initial version
Edit this page on GitHub