You can update the Krylov subspace represented by (V) and (H) after adding a vector (dak) to the (k^{th}) column of the original matrix (A) as follows in MATLAB:
main.m146 chars6 lines
In the code above:
You can update the (h) matrix directly by adding the inner product of (v) and (dak) to the (k^{th}) row of (h). Then, you can update the (v) matrix by extending it with the new vector obtained using the formula given above.
Remember to adjust the indices according to the 1-based indexing in MATLAB if necessary.
main.m0 chars1 lines
gistlibby LogSnag