how to range data and find maximum value for each range by using loop
Ältere Kommentare anzeigen
I have data (AB) consisting of two columns. The number of rows of this data is 80315. I want to divide this number into (1: 2000: 80315) and take the maximum values for each period (based on the second column, also i want to index the firt colum).
I using this code but its very long.
a = AB([1:2000],:);
aa=max(a);
a1 = AB([2000:4000],:);
aa1=max(a1);
a11 = AB([4000:6000],:);
aa11=max(a11);
maxvalues=([aa;aa1;aa11])
2 Kommentare
Pooja Kumari
am 29 Jun. 2022
According to your code, you want to get maximum value for each period, what do you mean by second column?
abdullah al-dulaimi
am 29 Jun. 2022
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Elementary Math finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!