How to find the minimum values in chunks of each column in a large matrix
1 view (last 30 days)
Show older comments
Anthony Padilla
on 7 Aug 2015
Commented: Anthony Padilla
on 7 Aug 2015
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?
0 Comments
Accepted Answer
Walter Roberson
on 7 Aug 2015
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.
More Answers (0)
See Also
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!