Minreal matlab. Even the example in the Pole-Zero simplification document.