In the file numlin.pdf on page 11 In the backsubstitution part the line
kk=ind(kk)
should be
kk=ind(k)