procedure LUBKSB(var A:matrx2; N:integer; var INDX,B:array of real); var I,LL,J,II:integer; SUM:real; BEGIN II:=0; For I:=1 To N DO begin LL:=Trunc(INDX[I]); Sum:=B[LL]; B[LL]:=B[I]; If II <> 0 Then begin For J:=II To I - 1 do Sum:=Sum - A[I, J] * B[J]; end Else If Sum <> 0 Then II:=I; B[I]:=Sum; end; For I:=N DownTo 1 do begin Sum:=B[I]; If I < N Then begin For J:=I + 1 To N do Sum:=Sum - A[I, J] * B[J]; end; B[I]:=Sum / A[I, I]; end; End;