The formula to estimate $\mathbf{h}$ is then $$\hat{\mathbf{h}} = (X^T X)^{-1} X^T \vec{y}\tag{2}$$
I think this can be implemented in Matlab using hat_h = pinv(X)*X*y
Question 1 : What is the lag of the model?
Question 2: I don't know how to create the design matrix X
in order to estimate h
. Can somebody please provide the complete implementation? Thank you