You are on page 1of 3

PRACTICA G-S G-J

Sea la Matriz:

A1

-1

m 3 de cada material a extraer en


cada yacicm iento

b1 =

CREANDO PROGRAMA EN GAUSS SEIDEL

CONGS( A , b , n ) :=

for i 0 .. n
for j 0 .. n
L

i, j

i, j

if i > j

0 otherwise
D

i, j

i, j

if i = j

0 otherwise
U

i, j

i, j

if i < j

0 otherwise
Tgs -( L + D)
Tgs

CONGS A1 , b1 , 2 =

-1

0 -0.385 -0.481
Tgs := 0 0.231 -0.112

0
0.218
0

0
eigenvals(Tgs ) = 0.231

0.218

CONGJ( A , b , n) :=

for i 0 .. n
for j 0 .. n
L

i, j

i, j

if i > j

0 otherwise
U

i,j

i,j

if i < j

0 otherwise
D

i,j

i,j

if i = j

0 otherwise
Tgj -D

-1

(L + U)

Tgj

CONGJ A1 , b 1 , 2 =

-0.385 -0.481
0

Tgj := -0.6
0
-0.4

0
-0.327 -0.545

-0.913
eigenvals(Tgj) = 0.457 + 0.138i

0.457 - 0.138i

1
y := 1

1

GJ( A , b , x, n , m) :=

Xy
for i 0 .. n
for j 0 .. n
L

i, j

i, j

if i > j

0 otherwise
D

i,j

i,j

if i = j

0 otherwise
U

i,j

i,j

if i < j

0 otherwise
for k 0 .. m
X -D

-1

( L + U) X + D

k+ 1 , 1
k+ 1 , 2
k+ 1 , 3

0
1
2

S
S

0 0.25
0.52 0.2

A10:= 0.3 0.5 0.2 0

1 0.18 0.3 0.550

4800
b 1 := 05810

9229.903846
5690
1

-211.433566

3
GJ A1 , b 1 , y , 2 , 70 = 4

8008.412332

367.416542

7311.950532

972.064112

6769.467411

1483.307886

...

-1

You might also like