function x = lu_solve(A, b) n = size(A,1) [L, U] = lu0(A); L; U; L = L(n:-1:1, n:-1:1) y = back_sub(L, b(n:-1:1)) x = back_sub(U, y(n:-1:1));