Fixed 2D matrix with 3D matrix calculations