Compute the sum of the corner elements of an array (vector or matrix).
If any corner element is NaN, return NaN.
If any corner element is Inf, return Inf.
If both NaN and Inf appear among the corners, return -1.
If the input is empty, return [].
Some built-in functions are forbidden.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers4
Suggested Problems
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
If you restrict what functions can be used in a Cody problem, please, stick to the original restrictions after publishing the problem and do not make them stricter based on solutions already submitted.