Given a square matrix as input, write a function that returns the sum of all elements above the main diagonal.
If the input matrix is empty ([]), the output must also be empty ([]).
Your solution must use exactly one for loop.
Note: Some built-in MATLAB functions are disabled for this problem.
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers5
Suggested Problems
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!