Given a matrix, find the average of the second largest values in each row. The same value does not exist on a row.
Example: input x = [1 2 3 4;8 7 6 5;9 0 1 4] >>> output y = (3+7+4) / 3
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers54
Suggested Problems
-
Back to basics 23 - Triangular matrix
1146 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
896 Solvers
-
Cumulative product of a vector
302 Solvers
-
Matlab Basics II - Max & Index of Max
266 Solvers
-
319 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!