how to range data and find maximum value for each range by using loop
Mostrar comentarios más antiguos
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 comentarios
Pooja Kumari
el 29 de Jun. de 2022
According to your code, you want to get maximum value for each period, what do you mean by second column?
abdullah al-dulaimi
el 29 de Jun. de 2022
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Elementary Math en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!