gcd(m,n)

Calculates greatest common divisor of two integers with Euclid's algorithm.
225 Downloads
Updated 22 Jul 2015

View License

GCD calculates the greatest common divisor of two integers, m and n, using Euclid's algorithm. Euclid's algorithm states that the gcd of m and n is the same as the gcd of n and mod(m,n).

Cite As

Andrew Wheatley (2024). gcd(m,n) (https://www.mathworks.com/matlabcentral/fileexchange/52223-gcd-m-n), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0

Fixed description.