The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



FillDiagArray


Unit:SDL_openarrays
Class: none
Declaration: [1] function FillDiagArray (var Mat: TInt2DArray; Diag: integer): integer;
[2] function FillDiagArray (var Mat: TInt3DArray; Diag: integer): integer;
[3] function FillDiagArray (var Mat: TInt4DArray; Diag: integer): integer;
[4] function FillDiagArray (var Mat: TDouble2DArray; Diag: double): integer;
[5] function FillDiagArray (var Mat: TDouble3DArray; Diag: double): integer;
[6] function FillDiagArray (var Mat: TDouble4DArray; Diag: double): integer;

The function FillDiagArray fills the matrix Mat so that each cell in the main diagonal holds the value Diag and all other cells in the matrix hold a zero value.

The function returns the following error codes:

 0 ... everything is OK
-1 ... the matrix Mat has zero size
-2 ... Mat is not square matrix



Last Update: 2023-Feb-07