Anda di halaman 1dari 7

NAMA

: DONI A.R PURBA

NIM

: 122406108

GROUP

: KC1 12

SOAL PERTAMA

>> a=[1 3 5 9; 2 7 8 13; 2 5 9 7]

a=

13

>> a(2,:)=a(2,:)-2*a(1,:)

a=

-2

-5

>> a(3,:)=a(3,:)-2*a(1,:)

a=

-2

-5

-1

-1 -11

>> a(3,:)=a(3,:)*-1

a=

-2

-5

11

>> a(3,:)=a(3,:)-a(2,:)

a=

-2

-5

16

>> z=a(3,4)/a(3,3)

z=

5.3333

>> y=(a(2,4)-z*a(2,3))/a(2,2)

y=

5.6667

>> x= (a(1,4)-z*a(1,3)-y*a(1,2))/a(1,1)

x=

-34.6667

Buat soal dengan cara penyelesaian metode Gauss


>> a = [1 2 4 5; 2 9 3 7; 2 7 9 11]

a =

11

>> a(2,:) = a(2,:)-2*a(1,:)

a =

-5

-3

11

>> a(3,:) = a(3,:)-2*a(1,:)

a =

-5

-3

>> a(3,:) = (5*a(3,:))-(3*a(2,:))

a =

-5

-3

20

14

>> z=a(3,4)/a(3,3)

z =

0.7000

>> y=(a(2,4)-z*a(2,3))/a(2,2)

y =

0.1000

>> x= (a(1,4)-z*a(1,3)-y*a(1,2))/a(1,1)

x =

>> a = [1 3 5 7; 3 8 7 11; 2 5 9 18]

a =

11

18

>> a(2,:) = a(2,:)-3*a(1,:)

a =

-1

-8

-10

18

>> a(3,:) = a(3,:)-2*a(1,:)

a =

-1

-8

-10

-1

-1

>> a(3,:) = a(3,:)*-1

a =

-1

-8

-10

-4

>> a(2,:) = a(2,:)*-1

a =

10

-4

>> a(3,:) = a(3,:)-a(2,:)

a =

10

-7

-14

>> z=a(3,4)/a(3,3)

z =

>> y=(a(2,4)-z*a(2,3))/a(2,2)

y =

-6

>> x= (a(1,4)-z*a(1,3)-y*a(1,2))/a(1,1)

x =

15