Write a recursive function named sumRings that consumes an M by N array and outputs a vector of the sums of its consecutive rings. If the input array is a 1xN or Mx1 (row or column vector), find the sum of its elements. If the input array is empty, the output should be an empty vector (not zero).
You may only use the following built-in functions: size, sum, isempty, or length. You must use recursion to solve this problem.