Hello I have this matrix that is (5 x 7)
and as you can see the matrix has three-diagonals from repeating numbers
I was wondering how to compute this matrix but for (t-2) x t dimension
I have this code, but only get the vector (of repeating numbers) in the diagonal (not 3 diagonal)
> diag(c(1,-2,1), nrow = 5, ncol=7) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 1 0 0 0 0 0 0 [2,] 0 -2 0 0 0 0 0 [3,] 0 0 1 0 0 0 0 [4,] 0 0 0 1 0 0 0 [5,] 0 0 0 0 -2 0 0 How can I accomplish this?
Thanks in advance
