Mikroelektronika MIKROE-724 データシート

ページ / 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
651
Matrices Library
mikroBasic 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
sub  procedure  Matrix_Transpose(dim  byref  src,  dest  as  word[1024],  dim 
numRows, numCols as 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
dim
  mx1 as word[6]
  mxDest as word[9]
...
Matrix_Transpose(mx1, mxDest, 2, 3)
Notes
[W0..W5] used, not restored