vecgcd

Computes the GCD of the elements of the integer vector V.
540 téléchargements
Mise à jour 28 jan. 2011

Afficher la licence

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.

Citation pour cette source

Steven Gregory (2024). vecgcd (https://www.mathworks.com/matlabcentral/fileexchange/30216-vecgcd), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2006a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Arithmetic Operations dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Publié le Notes de version
1.0.0.0