Question: For MatLab Test of input parameters Write a Function called CheckInputs which checks if the three inputs parameters are the correct data types. The 1st,
Test of input parameters Write a Function called CheckInputs which checks if the three inputs parameters are the correct data types. The 1st, 2nd, 3rd input variables must be a string, numeric and logical type respectively. The output of Checkinputs should be a logical row array named errorCode, with 4 values. If all the input parameters are of specified datatypes the errorCode should consists of all false (boolean) values. If 1st input parameter is not a string set the 1st array element in errorCode to true. If 2nd input parameter is not a number set the 2nd array element in errorCode to true. If 3rd input parameter is not a logical value set the 3rd array element in errorCode to true. Set the 4th array element in errorCode to true if any of the three input parameters are missing or of different datatype than specified. Hint: Use nargin to determine the number of input parameters in CheckInputs function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
