MATLAB: How to find the minimum values in chunks of each column in a large matrix

matrix manipulation

I have a large matrix with 10s of columns and 100s of rows. I essentially want to find the minimum value of each column in four parts. I want to take those values and put them into a matrix with four columns containing the four minimum values from each column of the original matrix. Can anyone give me some insight on getting this started?

Best Answer

squeeze(min(reshape(YourMatrix, size(YourMatrix,1)/4, 4, size(YourMatrix,2)))
If your matrix does not have a multiple of 4 for rows or you do not want the division to be equal, then more work would have to be done.