convenient way to achieve max value in matrix and it location
Afficher commentaires plus anciens
Hi:
I have a 3-dimension matrix, a*b*c, I want to achieve the max value at 3rd dimension, and their corresponding location.
I use command: [a,b] = max(test,[],3);
however, the teturned matrix is with size a*b, but I expect it to be c*1 (maximum value), and maybe a list of 2-dimension matrix that indicate the location of maximum value.
not sure if there is any mistake with my command or understanding, thanks for the help here.
Thanks!
Yu
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!