Question: Matlab Problem 1a: In this problem, you are going to create a function that takes 4 inputs and returns a structure. The function has the
Matlab

Problem 1a: In this problem, you are going to create a function that takes 4 inputs and returns a structure. The function has the format: Function structure-Construct (brand, color, VIN, operational) There are some requirements for this function: 1) If the number of inputs is not 4, display Error: Incorrect number of field values provided.' 2) The input 'brand' must be string, if not, display 'Error: brand must be string. 3) The input color' must be string, if not, display 'Error: brand must be string. 4) The input VIN is a mix of string and numbers. It's 6 digits in total. The first digit will be a character 'V', the others will be numbers. You can use isstrprop0 function. Use isstrprop(array, alpha') to check the string. For example: >array-'a1223' array a1223 >> isstrprop (array, 'alpha ans 1x5 logical array 1 0 00 0 5) The input operational' must be Boolean value, True or False. If not, display 'Error: operational must be Boolean
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
