It's important to store the data in a way that it can be retrieved in the languages used.  C-language stores in row-major order (all of first row comes first, then all of second row,...) with every index running from 0 to it's dimension-1.  So the order of array x[2][3] is x[0][0], x[0][1], x[0][2], x[1][0], x[1][1], x[1][2].   So in C language, x[i][j] is stored the same place as a 1-dimensional array entry x1dim[ i*3 +j].  If the data is stored that way, it is easy to retrieve in C language.
Fortran and MATLAB are different.  They store in column-major order (all of first column comes first, then all of second row,...) and every index runs from 1 to it's dimension.  So the index order is the reverse of C and all the indices are 1 greater.  If you store the data in the C language order, FORTRAN can find X_C_language[i][j] using X_FORTRAN(j+1, i+1).  For instance, X_C_language[1][2] is equal to X_FORTRAN(3,2).  In 1-dimensional arrays, that data value is at X1dim_C_language[2*Cdim2 + 3], which is the same position as X1dim_FORTRAN(2*Fdim1 + 3 + 1).  Remember that Cdim2 = Fdim1 because the order of indices is reversed.
MATLAB is the same as FORTRAN.  Ada is the same as C except the indices normally start at 1.  Any language will have the indices in one of those C or FORTRAN orders and the indices will start at 0 or 1 and can be adjusted accordingly to get at the stored data.
Sorry if this explanation is confusing, but I think it is accurate and important for a programmer to know.