Applying estimated transfer function to a signal
Your values for m and n are way too big. Matlab starts getting numerical problems for those values above 30, sometimes.

Try reducing them to more reasonable numbers (e.g. 10) and slowly increase them until invfreqz generates bogus outputs.