Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB lest Inputs Write a function Checklnputs that checks if three inputs parameters are the correct data types. The output of Checklnputs is a logical

MATLABimage text in transcribedimage text in transcribedimage text in transcribed

lest Inputs Write a function Checklnputs that checks if three inputs parameters are the correct data types. The output of Checklnputs is a logical row array errorCode with 4 values. If all the tests pass, then errorCode consists of only of 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. For example >> name-"Joe: gpa-3; en rollStatus=t rue ; %Ali datatypes correct errorCode - CheckInputs (name, gpa, enrollStatus) errorCode - 1x4 logical array >> names]; gpa-3 ; en rollStatusrue; % First datatype incorrect errorCodeCheckInputs (name, gpa, enrollStatus) errorCode 1x4 logical array incorrect >> name-' Joe'; gpa-3 ; enrollStatus=1 % Third datatype errorCode = Check!nputs(name, gpa, enrol!Status) enrollStatus errorCode 1x4 logical array 0 0 1 0 gpa) % Absent input argument >> errorCode = Check!nputs (name, errorCode = 1x4 logical array

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

Students also viewed these Databases questions