Function Reference
— Function File: q = polygcd (b, a, tol)

Find greatest common divisor of two polynomials. This is equivalent to the polynomial found by multiplying together all the common roots. Together with deconv, you can reduce a ratio of two polynomials. Tolerance defaults to

          sqrt(eps).

Note that this is an unstable algorithm, so don't try it on large polynomials.

Example

          polygcd (poly(1:8), poly(3:12)) - poly(3:8)
           [ 0, 0, 0, 0, 0, 0, 0 ]
          deconv (poly(1:8), polygcd (poly(1:8), poly(3:12))) ...
            - poly(1:2)
           [ 0, 0, 0 ]