Finding the max value in a column every 601 rows of excel file

2 views (last 30 days)
Hello everyone,
I have a problem that I'm trying to solve.
Initially, I had to combine 313 excel files into one, each one of these excel files is 600 rows x 100 columns, and from each column I need only the max value.
What I manage to do so far, is to combine all the excel files into one excel, but everything was added into one column.
So now I need to find the max value every 601 rows of this column. Any ideas on how to create this loop of finding the max value every 601 rows?
Thank you very much in advance for your help!

Answers (1)

cr
cr on 15 Nov 2022
If you already have the one big column, it's easy to reshape it into a matrix of 600xN (N=100*313?)
>> M = reshape(BigColumMatrix,600,numel(BigColumnMatrix)/600);
>> columnMaximums = max(m)
For the first line to work, the number of elements in your BigColumnMatrix must be a perfectly divisible by 600.
Cheers.

Categories

Find more on Data Import from MATLAB 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!

Translated by