I dont really understand what you mean by rolling hills and caves.
A matrix has is a plain which has a certain amount of vertices in the x direction and a certain amount in the z direction. The height of each vertex can be changed, and thats essentially all a matrix is. To end up on the other side of the world, you would shift each vertex on the matrix to one beside it, using the commands:
shift matrix up, shift matrix down, shift matrix left and shift matrix right.
Experimenting with these is the only way to get them right.
Whatever I did I didn't do it!