To find Maximum value and minimum value for each group of four rows for a 180*1 matrix
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
KSSV
il 27 Lug 2021
A = rand(180,1) ;
B = reshape(A,12,[])' ;
themax = max(B) ;
themin = min(B) ;
0 Commenti
Più risposte (1)
Rik
il 27 Lug 2021
Easy if you reshape the vector to an array:
data=rand(180,1);
data_=reshape(data,12,[]);
max(data_,[],1)
min(data_,[],1)
0 Commenti
Vedere anche
Categorie
Scopri di più su Operators and Elementary Operations in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!