Fachriars's Site

Depkominfo Kemakom IlkomUPI Bandung Majalengka

Program Invers Matriks (Pascal)

Mata kuliah aljabar linear dan matriks yang menyebabkan adanya program ini,

juga tentang program invers matriks ini merupakan tugas dari mata kuliah tersebut..

Akan tampil diprogram :

berikut source codenya :
program matriks_invers;
uses wincrt;

var n,i,j,x,y,k,l,m: integer;
a:array[1..20,1..20] of real;

begin
{gotoxy (10,1);}
writeln (‘Program Pencarian Invers Matriks’);
writeln;
writeln (‘Masukkan ordo matrik (n x n).’);
write (‘n : ‘);
readln (n);
writeln;
for i:=1 to n do
begin
for j:=1 to n do
begin
write (‘A(‘,i,’,’,j,’) : ‘);
readln (a[i,j]);
end;
end;
writeln;
for i:=1 to n do
begin
for j:=1 to n do
write (‘ ‘,a[i,j]:0:0);
writeln;
end;

{MATTRIK SISI KANAN}

for j:=n+1 to n+n do
begin
i:=j-n;
a[i,j]:=1;
end;
for j:=n+1 to n+n do
begin
for i:=1 to n do
if i<>j-n then a[i,j]:=0;
end;

{PROSES PENGINVERSAN}
for i:=1 to n do
begin
for j:=1 to n+n do
begin
if i<>j then a[i,j]:=a[i,j]/a[i,i];
end;
for j:=1 to n+n do
begin
if i=j then a[i,j]:=1;
end;

{PENJUMLAHAN KESATU BARIS ELEMENT}
for l:=1 to n do
begin
if i<>l then
begin
for j:=i+1 to n+n do
begin
a[l,j]:=a[l,j]-(a[i,j]*a[l,i]);
end;
end;
end;

{PEMBUATAN NOL DISEKITAR MATRIKS KIRI}
for k:=1 to n do
begin
if i<>k then
begin
a[k,i]:=0;
end;
end;
end;

{PENCETAKAN}
readln;
writeln(‘Maka invers dari matrik adalah :’);
for i:=1 to n do
begin
for j:=n+1 to n+n do
write (‘ ‘,a[i,j]:0:2);
writeln;
end;

readln;
end.

download program invers matriks Disini
Semoga bermanfaat😀

Knowledge is for share

4 responses to “Program Invers Matriks (Pascal)

  1. arywidhia March 24, 2013 at 19:17

    for i nya penjumlahan kesatu baris elemen di taro di mana? kok itu tiba tiba ada if il
    tlg bls secepatnya :3

  2. arywidhia March 24, 2013 at 19:19

    if il maksudnya

  3. fachriars March 26, 2013 at 07:02

    untuk penjumlahan prosesnya yang ini :

    {PENJUMLAHAN KESATU BARIS ELEMENT}
    for l:=1 to n do
    begin
    if il then
    begin
    for j:=i+1 to n+n do
    begin
    a[l,j]:=a[l,j]-(a[i,j]*a[l,i]);
    end;
    end;
    end;

    terima kasih🙂

  4. junita November 28, 2016 at 18:35

    hi mau tanya itu matrik sisi kanan maksudnya apa y yang dari j =4 ke 6 jika ordo 3×3

Tinggalkan Sebuah Komentar

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: