max and min values in an array
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
thank you! Found the solution! Thank you!
3 commentaires
madhan ravi
le 7 Avr 2019
NO NO NO!!!!,Why did you delete all the contents of the question and the comments?, it's a terrible thing to do . Others may also benefit from the question.
Réponse acceptée
madhan ravi
le 7 Avr 2019
Modifié(e) : madhan ravi
le 7 Avr 2019
See if this does what you want , first we split into 16 separate rows each and then we conquer in the third dimension:
[m,n]=size(A); % where A is your matrix of size 256 X 40K
parts = 16;
AA = permute(reshape(A.',n,m/parts,[]),[2,1,3]);
Max = max(AA,[],[1,2]); % max(max(AA)) for versions <= 2016b
[r,~]=find(AA == Max) % r represents rows
6 commentaires
madhan ravi
le 7 Avr 2019
replace
[r,~]=find(AA == Max)
with
[r,c,p]=ind2sub(size(AA),find(AA==Max)) % r represents rows , c represents columns & p represents pages
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!