MBot Software Library  v1.0
An API documentation to mbot_firmware repository
Public Attributes | List of all members
rc_matrix_t Struct Reference
RC » Math » Matrix

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

#include <matrix.h>

Public Attributes

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

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

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