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

조회 수: 1 (최근 30일)
Evangelia Karampasi
Evangelia Karampasi 2022년 11월 15일
답변: cr 2022년 11월 15일
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!

답변 (1개)

cr
cr 2022년 11월 15일
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.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by