Here's how I'd break this down. First, let's have a look at what the syntax produced for X:
So X is a matrix. It has two rows, the first row has the numbers 1,2,3 and the second row has the numbers 4,5,6. All of this is just the meaning of the [ the , and the ; in MATLAB
In the next step we're going to index into X. When you index into a matrix, you provide rows and columns. Before we look at how you indexed into X, let's do some simpler versions:
There's just one more character we need to understand to fully grasp the syntax, which is the colon (:). Let's experiment with colon in a few ways:
Now you hopefully can parse X(2:-1:1, 3:-1:1)
It says we're going to be looking at the matrix X, and the rows we want will be row numbers between 2 and 1 with an increment of -1, and the column numbers are between 3 and 1 with an increment of -1. Let's just see those row numbers and column numbers in case it's unclear:
And that's it, hopefully ans2 now makes sense!