Problem 42675. Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]
Solution Stats
Problem Comments
-
1 Comment
Carl Witthoft
on 11 Nov 2015
Sans test cases with rank 11 (or even 3), it's too easy to provide a solution which passes the test but fails for, say, dyadics. Or did the originator really mean to stick with tensors (rank 2) of arbitrary x and y dimension?
Solution Comments
Show commentsProblem Recent Solvers93
Suggested Problems
-
9700 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
791 Solvers
-
Sum of first n positive integers
571 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
368 Solvers
-
Find the area of the four walls
271 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!