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....



Multiply


Unit:SDL_matrix
Class: TMatrix, TIntMatrix
Declaration: function Multiply (MatB, MatRes: TMatrix): boolean; { class TMatrix }
function Multiply (MatB, MatRes: TIntMatrix): boolean; { class TIntMatrix }

The function Multiply calculates the product of matrix self times MatB. The resulting matrix is stored in MatRes. The function returns the value TRUE, if the multiplication has been carried out successfully.

Hint: The multiplication of two matrices is only possible, if the number of columns of the first matrix (self ) equals the number of rows of the second matrix (MatB ). In addition, the resulting matrix MatRes has to have the same number of rows as the matrix self. The following figure illustrates the context:

MATMULT.gif

Example: The statement MatA.Multiply (MatB, MatR) multiplies the matrix MatA with MatB and stores the result in MatR.


Last Update: 2008-Okt-29