Question: Write a function that takes an array as an input, and returns an array as an output. Your function should check to make sure that
Write a function that takes an array as an input, and returns an array as an output. Your function should check to make sure that the array has more than one element. If it does not, it should return an empty array. If the array has more than one element, your output should be an array with two elements. The first element should be the first element of the input array. The second element should be the last element of the input array. Please look up the "length" function in MATLAB to help you with this problem.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
