% Resolucion e un sistema lineal AX=B mediante la generacion de una sucesion {P
% que converge a la solucion, a partir de un punto inicial P<0>. Una condicion
% suficiente para que el metodo sea aplicable es que A sea diagonal estrictamente dominante.
%
%Sintaxis
% X=jacobi(A,B,P,delta, max1)
%
%Entrada
% - A es una matriz invertible de orden n x n (cuadrada)
% - B es una matriz de orden n x 1 (columna)
% - P es una matriz de orden N x 1: el punto inicial
% - delta es la tolerancia de P
% - max1 es el numero maximo de iteraciones
%Resultados
% - X es la matriz de orden N x 1:
% la aproximacion a la solucion de AX=B
% generada por el metodo iterativo de Jacobi
N = length(B);
for k=1:max1
for j=1:N
X(j)=(B(j)-A(j,[1:j-1,j+1:N])*P([1:j-1,j+1:N]))/A(j,j);
end
err=abs(norm(X'-P));
relerr=err/(norm(X)+eps);
P=X';
if (err < delta) (relerr < delta)
break
end
end
X=X';
T-Shirt | India Style | T-Shirts - The Tatiana
ResponderEliminarT-Shirts: titanium iv chloride ₹2,900 titanium white octane - ₹2,900 · T-Shirts: ₹8,900 · stilletto titanium hammer T-Shirts: ₹3,900 properties of titanium The T-Shirt is our most popular choice because the design and style of titanium rings for men