Robot Control Library
rc_matrix_t Struct Reference

Struct containing the state of a matrix and a pointer to dynamically allocated memory to hold its contents. More...

#include <rc/math/matrix.h>

Data Fields

int rows
 number of rows in the matrix More...
 
int cols
 number of columns in the matrix More...
 
double ** d
 pointer to allocated 2d array More...
 
int initialized
 set to 1 once memory has been allocated More...
 

Detailed Description

Struct containing the state of a matrix and a pointer to dynamically allocated memory to hold its contents.

Set and read values directly with this code:

matrix.d[row][col] = new_value; // set value in the matrix
value = matrix.d[row][col]; // get value from the matrix
Examples:
rc_altitude.c, rc_benchmark_algebra.c, rc_test_algebra.c, rc_test_kalman.c, and rc_test_matrix.c.

Field Documentation

◆ rows

int rows

number of rows in the matrix

◆ cols

int cols

number of columns in the matrix

◆ d

double** d

pointer to allocated 2d array

Examples:
rc_altitude.c, and rc_test_kalman.c.

◆ initialized

int initialized

set to 1 once memory has been allocated


The documentation for this struct was generated from the following file: