User manual

mikroC PRO for dsPIC
MikroElektronika
685
Matrices Library
mikroC 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
void Matrix_Transpose(unsigned *src, unsigned *dest, unsigned numRows,
unsigned numCols);
Description Function does matrix transposition.
dstM[i][j] = srcM[j][i]
Parameters - src: pointer to original matrix
- dest: pointer to result matrix
- numRows: number of rows in the source matrix
- numCols: number of cols in the source matrix
Returns Nothing.
Requires Nothing.
Example
int mx1[6] = {1,2,3,4,5,6};
int mxDest[9];
Matrix_Transpose(mx1, mxDest, 2,3);
Notes [W0..W5] used, not restored