LEVINSON.OMS
Script File:
# Description:
# Solves a Toeplitz system of equations.
#
# Toeplitz matrix
T = {[1., .5, .25], [.5, 1., .5], [.25, .5, 1.] }
# vector that defines the Toeplitz matrix
# the diagonal of the matrix is automatically 1
# the last element of r is not used
r = {.5, .25, .125}
# vector of right hand side values
b = {1., .5, .25}
# solve the Toeplitz equation T * x = b
x = levinson(r, b)
# note that T * x is equal to b
print "(T * x)' =", (T * x)'
print "b' =", b'
Output:
(T * x)' = [ 1 , 0.5 , 0.25 ]
b' = [ 1 , 0.5 , 0.25 ]