DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


MultiplyVector

Declaration: TMatrix.MultiplyVector (VecB, VecRes: TMatrix): boolean;
The function MultiplyVector calculates the product of matrix self with the vector VecB and stores the results in vector VecRes. The function returns the value TRUE, if the multiplication has been carried out successfully.

Hint: The multiplication of a matrix with a vector is only possible if the number of columns of the matrix (self) equals the number of elements of the vector (VecB). The resulting vector VecRes is automatically resized to the appropriate dimensions. The following figure illustrates this:

Example: The statement MatA.MultiplyVector (VecB, VecR) multiplies the matrix MatA with VecB and stores the result in VecR.