As a basic level MATLAB user, I could not solve the following problem despite several attempts. Could someone please suggest on how to solve this:
Write a function called corners that takes a matrix as an input argument and returns four outputs: the elements at its four corners in this order: top_left, top_right, bottom_left and bottom_right. Solve without using loops and if-statements.
See an example run below:
>> [a, b, c, d] = corners ([ 1 2; 3 4])