Here,we want to estimate a system with ARX and ARMAX.the euation of system is : 2(s+1)/s^2+2s+2so first, we find the discrete equation that sampling frequency is 100ms.Here,in our sample,na=nb=2,nc=1also ,this algorithm find the poles and zeros of the sys