Question: how to find greatest common divisor in matlab?
Answer: G = gcd( A ) finds the greatest common divisor of all elements of A . G = gcd( A , B ) finds the greatest common divisor of A and B . [ G , M ] = gcd( A ) returns the GCD G of all elements of A , and returns in M the linear combination of A that equals G .