egcd.m
Version 1.1.0.0 (1.45 KB) by
Steven Gregory
Extended greatest common divisor. Finds g = GCD(x(1), ..., x(end)) and v such that g == sum(v.*x).
[g v] = egcd(x) returns g = gcd(x(1), x(2), ..., x(end)) and v such that g == sum(v.*abs(x)).
Cite As
Steven Gregory (2026). egcd.m (https://se.mathworks.com/matlabcentral/fileexchange/23944-egcd-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2007a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Mathematics and Optimization > Mapping Toolbox > Data Import and Export >
- Radar > Mapping Toolbox > Data Import and Export >
Find more on Data Import and Export in Help Center and MATLAB Answers
Tags
Acknowledgements
Inspired by: nextperm, modinv(x, N), logmod
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
