{$I DECL.TLD} {$I SYSTEM.TLD} {$I MAT.TLD} {$I IOMAT.TLD} var mat : RealMatrixType_TL; v1,v2,v3,v4 : RealVectorType_TL; n : byte; begin InitIO; SetFormat(on); SetRealFormat(10,5); StringPosition(left); clrscr; n:=5; { Die Matrix-Ordnung } writeln('Loesung eines tri-diagonalen linearen Gleichungssystems'); input_vec(1,2,v1,n,console,'Eingabe des Vektors U der Bandmatrix'); clrscr; input_vec(1,2,v2,n,console,'Eingabe des Vektors V der Bandmatrix'); clrscr; input_vec(1,2,v3,n,console,'Eingabe des Vektors W der Bandmatrix'); clrscr; input_vec(1,2,v4,n,console,'Eingabe des Vektors Y'); { ----- Konversion der Vektoren in Matrix-Form zur Darstellung ----- } conv_tri_to_mat(v1,v2,v3,mat,n); clrscr; print_mat(1,1,mat,n,console,'Die tri-diagonale Matrix'); { ----- Loesung eines tridiagonalen Gleichungssystems ----- } tri_diag(v1,v2,v3,v4,n); print_vec(1,10,v4,n,console,'Der Loesungsvektor'); { ----- Ueberpruefung der Loesung ----- } mult_mat_with_vec(mat,v4,v1,n); print_vec(1,15,v1,n,console,'Multiplikation der Matrix mit dem Loesungsvektor'); end.