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

MATLAB

MATLAB Function Name: evenOrOddLength Inputs: - (double) A vector Output: - (char)

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!