Documentos de Académico
Documentos de Profesional
Documentos de Cultura
clear all
clc
X0=zeros(1,n);
X=X0;
K=0;
Norma=1;
while Norma>1e-8
K=K+1;
fprintf('%d',K);
for i=1:n
suma=0;
for j=1:n
if i~=j
suma=suma+A(i,j)*X(j);
end
end
X(i)=(b(i)-suma)/A(i,i);
fprintf('%10.6f',X(1));
end
Norma=norm(X0-X);
fprintf('%10.6f\n',Norma);
X0=X;
if K>=m
break
end
end
x1 2 0 −4 /15 −1/15 x 1
| | |||
x 2 2 1/5
= + 0
x 3 2 −1/2 −1/3
1/10 . x 2
0 x3
|| |
0 −0.266 −0.066
|
α = 0.2 0
−0.5 −0.3 |
0.1 ; max |α|=0.8<1
0
∴ { x k }→ { x ¿ }
Iterando:
x k+1= β+ α . x k
K=0
Sea x 0 =β
1.282 1.336
|
max 2.3072− 2.6
0.552 0.4
=
|
0.29281 −1 −1
=1.2∗10 <10 ( falso)
2.3072 2.3072
K=2
|| |
x 3=β +α . x 2 x = 2 + 0.2 0
2 −0.5 −0.3 0 0.552 || | | |
0.1 . 2.3072 = 2.3116
0.6668
1.3498 1.282
|
max 2.3116 −2.3072
0.6668 0.552 |=
0.1148
=0. 4∗10−1< 10−1 (cumple)
2.3072 2.3116
1.3498
| |
∴ x=x' ' ' = 2.3116 es la solucion con ℇ=10−1
0.6668
Resultados en matlab