vecgcd

Computes the GCD of the elements of the integer vector V.

Vous suivez désormais cette soumission

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 (2026). vecgcd (https://fr.mathworks.com/matlabcentral/fileexchange/30216-vecgcd), MATLAB Central File Exchange. Extrait(e) le .

Catégories

En savoir plus sur Arithmetic Operations dans Help Center et MATLAB Answers

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0.0