X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=iterative%2Fsuccessive_over_relaxation.m;h=71b702db271c07ac4e0e74349b0ed39e70251337;hp=2bb96f8f1a2ca6f41f9828ba1df10a01a2367c8e;hb=cd4c36a426fb5a9105e0b834e69cfd78960337ce;hpb=40a26bb2dfcf53296d9996b88008a605ad59573c diff --git a/iterative/successive_over_relaxation.m b/iterative/successive_over_relaxation.m index 2bb96f8..71b702d 100644 --- a/iterative/successive_over_relaxation.m +++ b/iterative/successive_over_relaxation.m @@ -1,5 +1,5 @@ function [x, iterations, residual_norms] = ... - successive_over_relaxation(A, b, omega, x0, ... + successive_over_relaxation(omega, A, b, x0, ... tolerance, max_iterations) % % Solve the system, @@ -26,14 +26,14 @@ function [x, iterations, residual_norms] = ... % % INPUT: % + % ``omega`` -- The relaxation factor. + % % ``A`` -- The n-by-n coefficient matrix of the system. % % ``b`` -- An n-by-1 vector; the right-hand side of the system. % % ``x0`` -- An n-by-1 vector; an initial guess to the solution. % - % ``omega`` -- The relaxation factor. - % % ``tolerance`` -- (optional; default: 1e-10) the stopping tolerance. % we stop when the relative error (the infinity norm % of the residual divided by the infinity norm of