Skip to content

Unit Adjoin

October 4, 2008

unit adjoin;

interface
type matrix = array [1..10,1..10] of integer;
mi=record
e : matrix;
end;
min = array [1..10,1..10] of mi;
var
i,j,row,col,x,y,k,l : byte;
A : matrix;
function pangkat(var x,n : integer):integer;
procedure tukar(var a,b : integer);
procedure transpose(var A:matrix);

implementation
function pangkat(var x,n : integer):integer;
var
p,i : integer;
begin
p := 1;
for i := 1 to n do
p := p * x;
pangkat:=p;
end;
procedure tukar(var a,b : integer);
var
temp : integer;
begin
temp := a;
a := b;
b := temp;
end;

procedure transpose(var A : matrix);
begin
for i := 2 to row do
for j := 1 to (i-1) do
tukar(A[i,j],A[j,i]);
end;

procedure minor(var m : min; A : matrix);
begin
for i := 1 to (row-1) do
for j := 1 to (col-1) do
begin
x:= 0;
for k :=1 to row do
begin
x:=x+1;
y := 0;
for l := 1 to col do
begin
y:=y+1;

Download source code unit lengkapnya di sini

Pada unit ini juga terdapat prosedur pencarian determinan dan invers matrik..
Keren kan…

Komen yaw..

Leave a Comment

Leave a Reply

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: