convenient way to achieve max value in matrix and it location
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!