Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure ChangeTable(StringGrid:TStringGrid; icol,irow:integer);
- var
- MyComponent: TComponent;
- n,m,Ail,Akj:double;
- i,j:integer;
- begin
- n:=StrToFloat(StringGrid.Cells[icol,irow]);
- for I := 0 to StringGrid.ColCount - 1 do
- begin
- m:=StrToFloat(StringGrid.Cells[i,irow]);
- m:=m/n;
- StringGrid.Cells[i,irow]:=FloatToStr(m);
- end;
- for i := 0 to StringGrid.RowCount - 1 do
- begin
- if i <> irow then
- begin
- StringGrid.Cells[icol,i]:='0';
- end;
- end;
- for I := 0 to StringGrid.ColCount - 1 do
- for j := 0 to StringGrid.RowCount - 1 do
- if (i <> icol) and (j <> irow) then
- begin
- MyComponent := Form1.FindComponent('StringGrid'+IntToStr(scount-1));
- if MyComponent <> nil then
- begin
- m:=StrToFloat(TStringGrid(MyComponent).Cells[i,j]);
- Ail:=StrToFloat(TStringGrid(MyComponent).Cells[i,irow]);
- Akj:=StrToFloat(TStringGrid(MyComponent).Cells[icol,j]);
- m:=m-Ail*Akj/n;
- StringGrid.Cells[i,j]:=FloatToStr(m);
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement