Question: MATLAB Function Name: evenOrOddLength Inputs: - (double) A vector Output: - (char) A string, 'even' or 'odd' Description: - Write a function called evenOrOddLength that
MATLAB

Function Name: evenOrOddLength Inputs: - (double) A vector Output: - (char) A string, 'even' or 'odd' Description: - Write a function called evenOrOddLength that takes in a vector. If the length is even, output the string 'even'. If the length is odd, output the string 'odd'. - You MUST use a SWITCH statement Examples: ans1 = evenoroddLength ([234]) %> ans 1= 'odd' ans 2= evenoroddLength ([54321]) %> ans 2= 'odd' ans3 = evenoroddLength ([0000])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
