% % subroutine for solving a linear system with A=LU % given, but the k-th column in A is incorrect and % the correct column is stored in akt. Output: % the solution z in At z = b where At is the matrix % obtained by replacing the kth column in A by akt. % % % l = lower triangular matrix in A=LU % u = upper triangular matrix in A=LU % b = right-hand side in the linear system % akt = correct column % k = number of the incorrect column in A % n = dimension of the matrix % function z=smartsolve(l,u,b,akt,k,n)