I have a matrix of order `363 X 726`. Now I wanted to remove last 1394 elements in column-major format so that I can rearrange it into `512 X 512` matrix using MATLAB. Simply put, I want to perform the reversal of the operations seen in my previous question: [How to resize an image by adding extra pixels using matlab](https://stackoverflow.com/questions/36484804/how-to-resize-an-image-by-adding-extra-pixels-using-matlab). How can I do this in MATLAB?