0% found this document useful (0 votes)
24 views

Diagram Alir: INVERS METHOD: Mulai

The document contains diagrams of the flow for four different matrix inversion methods: INVERS METHOD, CRAMER METHOD, PIVOT POINT METHOD, and GAUSS JORDAN METHOD. Each diagram shows the steps of the algorithm, including inputting the matrix size and elements, performing calculations and transformations on the matrices, and outputting the solution.
Copyright
© © All Rights Reserved
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Diagram Alir: INVERS METHOD: Mulai

The document contains diagrams of the flow for four different matrix inversion methods: INVERS METHOD, CRAMER METHOD, PIVOT POINT METHOD, and GAUSS JORDAN METHOD. Each diagram shows the steps of the algorithm, including inputting the matrix size and elements, performing calculations and transformations on the matrices, and outputting the solution.
Copyright
© © All Rights Reserved
Available Formats
Download as XLS, PDF, TXT or read online on Scribd
You are on page 1/ 19

Diagram Alir : INVERS METHOD

Mulai
Definisi
Variabel
Definisi
Fungsi FNDET(X)

Input
"Ukuran Matriks",MMAKS

Ya

MMAKS<2 or MMAKS>3
Tdk

Deklarasi
Dimensi Matriks

For M=1 to MMAKS

For N = 1 To MMAKS

Input
A(M,N)

Next N
Next M

For M=1 to MMAKS

Input
B(M)

Next M

Tdk

MMAKS =2

Ya

DTMN = 0

D= A(1,1)*A(2,2)
-A(1,2)*A(2,1)

For N=1 To MMAKS


ATUKAR=A(1,1)
A(1,1)=A(2,2)
A(2,2)=ATUKAR
A(1,2)=-A(1,2)
A(2,1)=-A(2,1)

NoEle=0

For I=1 To MMAKS


X(1)=(A(1,1)*B(1)+A(1,2)*B(2))/D
X(2)=(A(2,1)*B(1)+A(2,2)*B(2))/D

For J=1 To MMAKS

I <>1 and J<>N

Ya

Tdk

Next J

Next I

DTMN=DTMN+A(1,N)*(1-)^(N+1)+
FNDET(AM(1),AM(2),AM(3),AM(4)

Next N

5
NoEle=NoEle+1
AM(NoEle)=A(I,J)

For M=1 To MMAKS

For N=1 To MMAKS


NoEle=0
For I=1 To MMAKS

For J=1 To MMAKS

I <>M and J<>N

Ya

Tdk

Next J

Next I
AA(M,N)=(-1)^(M+N)*
FNDET(AM(1),AM(2),AM(3),AM(4)
Next N

Next M

For M=1 to MMAKS

For N = 1 To MMAKS
A(M,N=AA(N,M

Next N
Next M

NoEle=NoEle+1
AM(NoEle)=A(I,J)

For M=1 to MMAKS

X(M)=0

For N = 1 To MMAKS

X(M)=X(M)+A(M,N)*B(N)

Next N

X(M)=X(M)/DTMN

Next M

For M=1 to MMAKS


Print
"Hasil",X(M)

Next M

Selesai

Diagram Alir :CRAMER METHOD


Mulai
Definisi
Variabel

Input
"Ukuran Matriks",MMAKS

MMAKS <2 or MMAKS > 3


Tdk

Deklarasi
Dimensi Matriks

For M=1 to MMAKS

For N = 1 To MMAKS

Input
A(M,N)

Next N
Next M

For M=1 to MMAKS

Input
B(M)

Next M

Ya

2
Tdk

MMAKS =2

Ya

For M=1 To MMAKS

DTMN= A(1,1)*A(2,2)
-A(1,2)*A(2,1)

For N=1 To MMAKS

For M=1 To MMAKS

D(M,N) = A(M,N)

For J=1 To MMAKS

Next N

For N =1 To MMAKS

Next M

IF N= M

Ya

Tdk

Gosub HITUNGD

D(J,N)=B(J)

D(J,N)=A(J,N

DTMN = DHIT
Next N
For M=1 To MMAKS

Next J

For J=1 To MMAKS

X(M)=(D(1,1)*D(2,2)-D(2,1)*
D(1,2))/DTMN

For N=1 To MMAKS


Next M
IF N=M

Ya

Tdk

5
D(J,N)=B(J)

D(J,N)=A(J,N)

Next N

HITUNGD

Next J

Gosub HITUNGD

DHIT = D(1,1)*D(2,2)*D(3,3)+D(1,2)*D(2,3)*D(3,1)
+D(1,3)*D(2,1)*D(3,2)-D(3,1)*D(2,2)*D(1,3)D(3,2)*D(2,3)*D(1,1)-D(3,3)*D(2,1)*D(1,2)

X(M)=DHIT/DTMN
RETURN
Next M

For M=1 to MMAKS

X(M)=0

For N = 1 To MMAKS

X(M)=X(M)+A(M,N)*B(N)

Next N

X(M)=X(M)/DTMN

Next M

For M=1 to MMAKS


Print
"Hasil",X(M)

Next M

Selesai

Diagram Alir :PIVOT POINT METHOD


Mulai
Definisi
Variabel

Input
"Ukuran Matriks",MMAKS

Deklarasi
Dimensi Matriks

For M=1 to MMAKS

For N = 1 To MMAKS

Input
A(M,N)

Next N
Next M

For M=1 to MMAKS

Input
A(M,MMAKS+1)

Next M

For N=1 To MMAKS

Besar = 0
MB=0

For M=N To MMAKS


Ya

ABS(A(M,N)>MB
Tdk

Besar=Abs(A(M,N))
MB=M

Next M
For J = 1 To MMAKS+1

Atukar = A(N,J)
A(N,J)=A(MB,J)
A(MB,J)=Atukar
Next J
For M=N To MMAKS
Tdk

M=N

Ya

Kali=A(M,N)

Bagi = A(M,N)

For J=N To MMAKS+1

For J=N To MMAKS+1

A(M,N)=A(M,N)-A(N,J*Kali

A(M,N)=A(M,N)/Bagi

Next J

Next J

Next M
Next N

For M=MMAKS-1 To 1 Step 1

For J=M+1 To MMAKS


A(M,MMAKS+1)=A(M,MMAKS+1)A(M,J)*A(J,MMAKS+1)

Next J
Next M

For M=1 to MMAKS


Print
"Hasil",A(M,MMAKS+1)

Next M

Selesai

Diagram Alir : GAUSS JORDAN METHOD


Mulai
Definisi
Variabel

Input
"Ukuran Matriks",MMAKS

Deklarasi
Dimensi Matriks

For M=1 to MMAKS

For N = 1 To MMAKS

Input
A(M,N)

Next N
Next M

For M=1 to MMAKS

Input
A(M,MMAKS+1)

Next M

For N=1 To MMAKS

For M=1 To MMAKS

M=N

Tdk

Ya

Bagi = A(M,N)

For J=N To MMAKS+1

A(M,J)=A(M,J)/Bagi

Next J

Next M

For M=1 To MMAKS

M<>N
Ya

Kali = A(M,N)

For J=N To MMAKS+1

A(M,J)=A(M,J)-A(N,J)*Kali
Next J

Next M

Next N
3

Tdk

For M=1 to MMAKS

Print
"Hasil",A(M,MMAKS+1)

Next M

Selesai

You might also like