mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-06 21:23:13 +02:00
8 lines
358 B
Mathematica
8 lines
358 B
Mathematica
|
|
function x = improveSolution(x, new_euclideanColumnsormOfR, euclideanColumnsormOfR, Matrix, Vector)
|
||
|
|
while new_euclideanColumnsormOfR <= euclideanColumnsormOfR
|
||
|
|
euclideanColumnsormOfR = new_euclideanColumnsormOfR;
|
||
|
|
r = Matrix*x - Vector;
|
||
|
|
x = x - r;
|
||
|
|
new_euclideanColumnsormOfR = norm(r);
|
||
|
|
end % end while
|
||
|
|
end % end function
|