# Finding the memory polynomial model coefficients

I want to build a memory polynomial model given that I know the corresponding output signals for known input signals. What is the easiest way to find the coefficients of it? And how do we take the memory and order into consideration while we build it.

This is what I know. if $$\A\$$ and $$\B\$$ are input and output signals of length $$\n\$$, then $$\A^{-1} B\$$ will give me a $$\n \times n\$$ matrix. But how can I introduce memory and order? If i add any extra columns to $$\A^{-1} B\$$, it will change its dimensions to $$\n \times m\$$ where $$\m > n\$$, and I can no more operate it on $$\A\$$.