Matrix manipulation functions.
More...
Go to the source code of this file.
|
| void | f3x3matrixAeqI (float A[][3]) |
| | function sets the 3x3 matrix A to the identity matrix
|
| |
| void | f3x3matrixAeqB (float A[][3], float B[][3]) |
| | function sets 3x3 matrix A to 3x3 matrix B
|
| |
| void | fmatrixAeqI (float *A[], int16_t rc) |
| | function sets the matrix A to the identity matrix
|
| |
| void | f3x3matrixAeqScalar (float A[][3], float Scalar) |
| | function sets every entry in the 3x3 matrix A to a constant scalar
|
| |
| void | f3x3matrixAeqInvSymB (float A[][3], float B[][3]) |
| |
| void | f3x3matrixAeqAxScalar (float A[][3], float Scalar) |
| | function multiplies all elements of 3x3 matrix A by the specified scalar
|
| |
| void | f3x3matrixAeqMinusA (float A[][3]) |
| | function negates all elements of 3x3 matrix A
|
| |
| float | f3x3matrixDetA (float A[][3]) |
| | function calculates the determinant of a 3x3 matrix
|
| |
| void | fEigenCompute10 (float A[][10], float eigval[], float eigvec[][10], int8_t n) |
| |
| void | fEigenCompute4 (float A[][4], float eigval[], float eigvec[][4], int8_t n) |
| |
| void | fComputeEigSlice (float fmatA[10][10], float fmatB[10][10], float fvecA[10], int8_t i, int8_t j, int8_t iMatrixSize) |
| |
| void | fmatrixAeqInvA (float *A[], int8_t iColInd[], int8_t iRowInd[], int8_t iPivot[], int8_t isize, int8_t *pierror) |
| |
| void | fveqRu (float fv[], float fR[][3], float fu[], int8_t itranspose) |
| |
| void | fVeq3x3AxV (float V[3], float A[][3]) |
| | function multiplies the 3x1 vector V by a 3x3 matrix A
|
| |
Matrix manipulation functions.
Contains functions for basic manipulation of 3x3 matrices
Definition in file matrix.h.
◆ f3x3matrixAeqAxScalar()
| void f3x3matrixAeqAxScalar |
( |
float |
A[][3], |
|
|
float |
Scalar |
|
) |
| |
function multiplies all elements of 3x3 matrix A by the specified scalar
Definition at line 109 of file matrix.c.
◆ f3x3matrixAeqB()
| void f3x3matrixAeqB |
( |
float |
A[][3], |
|
|
float |
B[][3] |
|
) |
| |
function sets 3x3 matrix A to 3x3 matrix B
Definition at line 47 of file matrix.c.
◆ f3x3matrixAeqI()
| void f3x3matrixAeqI |
( |
float |
A[][3] | ) |
|
function sets the 3x3 matrix A to the identity matrix
Definition at line 26 of file matrix.c.
◆ f3x3matrixAeqInvSymB()
| void f3x3matrixAeqInvSymB |
( |
float |
A[][3], |
|
|
float |
B[][3] |
|
) |
| |
function directly calculates the symmetric inverse of a symmetric 3x3 matrix only the on and above diagonal terms in B are used and need to be specified
Definition at line 149 of file matrix.c.
◆ f3x3matrixAeqMinusA()
| void f3x3matrixAeqMinusA |
( |
float |
A[][3] | ) |
|
function negates all elements of 3x3 matrix A
Definition at line 128 of file matrix.c.
◆ f3x3matrixAeqScalar()
| void f3x3matrixAeqScalar |
( |
float |
A[][3], |
|
|
float |
Scalar |
|
) |
| |
function sets every entry in the 3x3 matrix A to a constant scalar
Definition at line 90 of file matrix.c.
◆ f3x3matrixDetA()
| float f3x3matrixDetA |
( |
float |
A[][3] | ) |
|
function calculates the determinant of a 3x3 matrix
Definition at line 190 of file matrix.c.
◆ fComputeEigSlice()
| void fComputeEigSlice |
( |
float |
fmatA[10][10], |
|
|
float |
fmatB[10][10], |
|
|
float |
fvecA[10], |
|
|
int8_t |
i, |
|
|
int8_t |
j, |
|
|
int8_t |
iMatrixSize |
|
) |
| |
◆ fEigenCompute10()
| void fEigenCompute10 |
( |
float |
A[][10], |
|
|
float |
eigval[], |
|
|
float |
eigvec[][10], |
|
|
int8_t |
n |
|
) |
| |
function computes all eigenvalues and eigenvectors of a real symmetric matrix A[0..n-1][0..n-1] stored in the top left of a 10x10 array A[10][10]
- Parameters
-
| A | real symmetric matrix A[0..n-1][0..n-1] |
| eigval | eigval[0..n-1] returns the eigenvalues of A[][]. |
| eigvec | eigvec[0..n-1][0..n-1] returns the normalized eigenvectors of A[][] |
| n | n can vary up to and including 10 but the matrices A and eigvec must have 10 columns. |
Definition at line 215 of file matrix.c.
◆ fEigenCompute4()
| void fEigenCompute4 |
( |
float |
A[][4], |
|
|
float |
eigval[], |
|
|
float |
eigvec[][4], |
|
|
int8_t |
n |
|
) |
| |
function computes all eigenvalues and eigenvectors of a real symmetric matrix A[0..n-1][0..n-1] stored in the top left of a 4x4 array A[4][4] A[][] is changed on output. The eigenvectors are not sorted by value. This function is identical to eigencompute10 except for the workaround for 4x4 matrices since C cannot handle functions accepting matrices with variable numbers of columns.
- Parameters
-
| eigval | eigval[0..n-1] returns the eigenvalues of A[][]. |
| eigvec | eigvec[0..n-1][0..n-1] returns the normalized eigenvectors of A[][] |
| n | n can vary up to and including 4 but the matrices A and eigvec must have 4 columns. |
Definition at line 388 of file matrix.c.
◆ fmatrixAeqI()
| void fmatrixAeqI |
( |
float * |
A[], |
|
|
int16_t |
rc |
|
) |
| |
function sets the matrix A to the identity matrix
- Parameters
-
| A | pointer to the matrix |
| rc | dimension of the matrix |
Definition at line 68 of file matrix.c.
◆ fmatrixAeqInvA()
| void fmatrixAeqInvA |
( |
float * |
A[], |
|
|
int8_t |
iColInd[], |
|
|
int8_t |
iRowInd[], |
|
|
int8_t |
iPivot[], |
|
|
int8_t |
isize, |
|
|
int8_t * |
pierror |
|
) |
| |
function uses Gauss-Jordan elimination to compute the inverse of matrix A in situ on exit, A is replaced with its inverse
Definition at line 647 of file matrix.c.
◆ fVeq3x3AxV()
| void fVeq3x3AxV |
( |
float |
V[3], |
|
|
float |
A[][3] |
|
) |
| |
function multiplies the 3x1 vector V by a 3x3 matrix A
- Parameters
-
| V | used for both input and output |
Definition at line 852 of file matrix.c.
◆ fveqRu()
| void fveqRu |
( |
float |
fv[], |
|
|
float |
fR[][3], |
|
|
float |
fu[], |
|
|
int8_t |
itranspose |
|
) |
| |
function rotates 3x1 vector u onto 3x1 vector using 3x3 rotation matrix fR. the rotation is applied in the inverse direction if itranpose is true
- Parameters
-
| fv | 3x1 output vector |
| fR | rotation matrix |
| fu | 3x1 input vector |
| itranspose | true if inverse direction desired |
Definition at line 801 of file matrix.c.