Question: Write a function called CheckInputs which checks if three inputs parameters are the correct data types. The first, second, and third input variables must be

 Write a function called CheckInputs which checks if three inputs parameters

are the correct data types. The first, second, and third input variables

must be a string, numeric, and logical data type, respectively. The output Write a function called CheckInputs which checks if three inputs parameters are the correct data types. The first, second, and third input variables must be a string, numeric, and logical data type, respectively. The output of CheckInputs should be a logical row array, errorCode, with 4 values. If all the tests pass,then errorCode should consist of only false values. If the 1st input parameter is not a string, the 1st array element in errorCode is set true. If the 2nd input parameter is not a numeric, the 2nd array element in errorCode is set true. If the 3rd input parameter is not a logical variable, the 3rd array element in errorCode is set true. The 4th array element in errorCode is set true if three input parameters are not present.

est inputs Write a function called Checkinputs which checks if three inputs parameters are the correct data types. The first, second, and third input variables must be a string, numeric, and logical data type, respectively. The output of Checklnputs should be a logical row array, errorCode with 4 values. If all the tests pass,then errorCode should consist of only false values. If the 1st input parameter is not a string, the 1st array element in errorCode is set true. If the 2nd input parameter is not a numeric, the 2nd array element in errorCode is set true. If the 3rd input parameter is not a logical variable, the 3rd array element in errorCode is set true. The 4th array element in errorCode is set true if three input parameters are not present. Ex >> name= ' Joe'; gpa-3 ; en rollStatus-true; % All errorCode CheckInputs(name , gpa, en ro !Status) errorCode = datatypes correct 1x4 logical array >> name-1; gpa=3 ; en rollStatusrue; % First datatype incorrect errorCode - CheckInputs (name, gpa, enrollStatus) errorCode 1x4 logical array incorrect >> name= ' Joe'; gpa-3 ; en rollstatus-1 % Third datatype errorCode CheckInputs(name , gpa, en ro !Status) enrollstatus errorCode = 1x4 logical array Check!nputs(name, gpa) Absent input argument >> errorCode errorCode = 1x4 logical array

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!