how to range data and find maximum value for each range by using loop
古いコメントを表示
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 件のコメント
Pooja Kumari
2022 年 6 月 29 日
According to your code, you want to get maximum value for each period, what do you mean by second column?
abdullah al-dulaimi
2022 年 6 月 29 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Elementary Math についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!