Flip matrix in up/down direction
Example
A=
The size of the input matrix is:
X