There is a problem with LTI System. I need to find an impulse response from given input and output from stable LTI System. This is my input signal:
Let I write it like a vector. $x_n = \{1, 2, 1\}$
This is my output signal:
$y_n = \{0, -1, -2, 0, 2, 1\}$
I can find the length of my impulse response. $h_{\text{length}} = y_{\text{length}} - x_{\text{length}} + 1 = 4$
Based on this answer https://dsp.stackexchange.com/a/46663, I assumed that
> h_1 h_2 h_3 h_4 0 0
> 0 0 h_1 h_2 h_3 h_4
> ------------------------
> 0 -1 -2 0 2 1
where $h_1 = 0, h_2 = -1, h_3 = 2$ and $h_4 = 1$. $h_n$ must be $\{ 0, -1, 2, 1\}$
But when I check it in octave/mathlab I got a wrong convolution.
$conv([1\ 2 \ 1],[0 \ -1 \ 2 \ 1]) = [ 0 \ -1 \ 0 \ 4 \ 4 \ 1 ]$, but not $[0 \ -1 \ -2 \ 0 \ 2 \ 1]$
What am I doing wrong? Or this LTI System isn't stable?