Function Reference
— Loadable Function: g = gcd (a1, ...)
— Loadable Function: [g, v1, ...] = gcd (a1, ...)

If a single argument is given then compute the greatest common divisor of the elements of this argument. Otherwise if more than one argument is given all arguments must be the same size or scalar. In this case the greatest common divisor is calculated for element individually. All elements must be integers. For example,

          gcd ([15, 20])
               5

and

          gcd ([15, 9], [20 18])
               5  9

Optional return arguments v1, etc, contain integer vectors such that,

For backward compatibility with previous versions of this function, when all arguments are scalar, a single return argument v1 containing all of the values of v1, ... is acceptable.

See also: lcm min max ceil floor