Exercise 4.5.6

Answers

import numpy as np 
from scipy.linalg import toeplitz 
N=100 
k = np.array([5,-2]) 
row1 = np.hstack([k, np.zeros(N-2)]) 
S = toeplitz(row1, row1) 
L = np.linalg.cholesky(S) 
print(WhenN=, N, ’,␣The␣last␣column␣approaches␣to:␣’, L.transpose()[-2:, N-1])
When N =  100 , The last column approaches to:  [-1.  2.]

User profile picture
2020-03-20 00:00
Comments