vecgcd
Version 1.0.0.0 (1,44 KB) von
Steven Gregory
Computes the GCD of the elements of the integer vector V.
G = VECGCD(V) is the greatest common divisor of the elements of the integer
vector V. V must be a row or a column vector of integers.We define gcd([]) = 1 and gcd([0 0 ... 0]) = 0.
I believe that this routine is faster than recursively computing GCDs and the algorithm is simple enough to be used for pencil and paper calculations.
Zitieren als
Steven Gregory (2024). vecgcd (https://www.mathworks.com/matlabcentral/fileexchange/30216-vecgcd), MATLAB Central File Exchange. Abgerufen .
Kompatibilität der MATLAB-Version
Erstellt mit
R2006a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxKategorien
Mehr zu Arithmetic Operations finden Sie in Help Center und MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0.0 |