function Rekursif (MInput:Matriks;x:integer):Matriks;
var
i,j,k:Integer;
MOutput,temp:Matriks;
begin
temp:=MInput;
setlength(MOutput,length(MInput),length(MInput[0]));
begin
for k:=1 to x do
begin
MOutput:=Shrink(MInput,2);
begin
for i:=0 to length(MOutput)-1 do
begin
for j:=0 to length(MOutput[0])-1 do
begin
temp[i+(length(MOutput)-1) div 2,j+(length(MOutput[0])-1) div 2]
:=MOutput[i,j];
end;
end;
end;
end;
end;
Rekursif:=temp;
end;
No comments:
Post a Comment