(********************************************************************
** Пример работы с матрицами. **
** (c) S&s aKa Ilya Pinaeff (syn@crhefr.hptula.mednet.com) **
** DeN Tatyanin (2:5036/10.19@Fidonet aKa 345:8188/3@RANet) **
********************************************************************)
{$N+}
uses Matr_op;
var
A,B:Mp;
procedure Read_(A:Mp);
var
l,j:integer;
begin
with A^ do for l:=1 to n do for j:=1 to m do read(e(l,j)^);
end;
begin
A:=NIL;
B:=NIL;
A:=new(Mp,Init(3,3));
Read_(A);
writeln('Матpица A:');
Print(A);
writeln('Матpица A тpанспониp.:');
Print(A^.T);
SetM(B,Grevil(A));
writeln('Матpица A+.:');
Print(B);
writeln('Матpица A*A+.:');
Print({MMul(A,}MMul(B,A){)});
end.
------------- Cut here -----------
(********************************************************************
** Модуль работы с матрицами. **
** (c) S&s aKa Ilya Pinaeff (syn@crhefr.hptula.mednet.com) **
** DeN Tatyanin (2:5036/10.19@Fidonet aKa 345:8188/3@RANet) **
********************************************************************)
{$N+}
unit Matr_Op;
interface
type
Rl=^extended;
TArray=array[0..3000] of extended;
Arl=^TArray;
Mp=^Matr;
Matr=objec
|