Problem 1273. Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value.
Example :
The input is F :
F=zeros(4,4,4); F(2,2,2)=10;
The output is
b=[2 2 2] % the coordinates
Solution Stats
Problem Comments
-
1 Comment
goc3
on 18 Nov 2016
The test suite has been expanded.
Solution Comments
Show commentsProblem Recent Solvers413
Suggested Problems
-
16114 Solvers
-
513 Solvers
-
929 Solvers
-
Getting the indices from a vector
11515 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
874 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!