gcd(m,n)
Version 1.0.0.0 (1.86 KB) by
Andrew Wheatley
Calculates greatest common divisor of two integers with Euclid's algorithm.
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 LinuxCategories
Find more on Number Theory in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 | Fixed description. |