User manual

mikroPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
650
Matrix Library
Matrices Library
mikroPascal PRO for dsPIC30/33 and PIC24 includes a library for operating and working with matrices. All routines
work with fractional Q15 format.
Library Routines
Matrix_Transpose
Matrix_Subtract
Matrix_Scale
Matrix_Multiply
Matrix_Add
Matrix_Transpose
Prototype
procedure Matrix_Transpose(var src, dest: array[1024] of word; numRows,
numCols: word);
Description Function does matrix transposition.
dstM[i][j] = srcM[j][i]
Parameters - src: original matrix
- dest: result matrix
- numRows: number of rows in the source matrix
- numCols: number of cols in the source matrix
Returns Nothing.
Requires Nothing.
Example
var
mx1 : array[6] of word;
mx2 : array[6] of word;
mx3 : array[6] of word;
mxDest : array[9] of word;
...
Matrix_Transpose(mx1, mxDest, 2,3);
Notes [W0..W5] used, not restored