Question
MATLAB_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
MATLAB_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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started