To find Maximum value and minimum value for each group of four rows for a 180*1 matrix
1 次查看(过去 30 天)
显示 更早的评论
Say I have a 180x1 matrix. I have to find the max and min value of each 12 rows. e.g, max min value of 1-12th row and 13th to 24th row and so on..
0 个评论
采纳的回答
更多回答(1 个)
Rik
2021-7-27
Easy if you reshape the vector to an array:
data=rand(180,1);
data_=reshape(data,12,[]);
max(data_,[],1)
min(data_,[],1)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!