toeplitz matrix

Do you mean like this?

function toeplitz(n)
    r = [2; -1; zeros(n-2)]
    Toeplitz(r, r)
end
1 Like