matrix in arduino


hello all,
i have big question.  trying create sort of neural pathway type code, trying make simple.  however, not sure how make customizable matrix.  first thought of making array in array "double node[][];", give me matrix 2 wide, , need more 2 wide sadly.  want give 2 variables, height , width, , initialize variables can use matrix.  wanted in method, not quite sure how declare global variables if  possible within method.  trying avoid using bunch of "double node;" lines keep modifying fast.  suggestions or appreciated. 

i don't understand problem. double node[][]  doesn't specify number of elements in either dimension.

double node[3][3] = {0};

defines 3x3 matrix.

double node[3][3][3] = {0};

defines 3x3x3 matrix.


Arduino Forum > Using Arduino > Programming Questions > matrix in arduino


arduino

Comments