I have the following matrix:
const double values[3][41] = { { -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -72.385, -60.657,
-72.385, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99 }, { -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -97.597, -81.568,
-74.745, -66.323, -74.745, -81.568, -97.597, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99 },
{ -116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -107.26, -97.836, -89.451, -83.642, -78.459, -71.99,
-78.459, -83.642, -89.451, -97.836, -107.26, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99, -116.99,
-116.99, -116.99, -116.99, -116.99, -116.99, -116.99 }}
Is there a quick way to transform it to values[3][41]
while preserving correctness of the values
These are values coming from a device which has written the output as [y][x]
instead of [x][y]
. I though of writing a wrapped function for invoking values from the matrix but maybe there is a way to invert the axes.