1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Bezzdna [24]
4 years ago
13

Test inputs write a function called checkinputs which checks if three inputs parameters are the correct data types. the first, s

econd, 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.
Computers and Technology
1 answer:
Alborosie4 years ago
6 0

Here you go,

Program:


function errorCode = CheckInputs(name, gpa, enrollStatus)

   %Create a errorCode as a 1x4 logical array    

   errorCode=[true true true false];

   %Check number input arguments taken by the function

   %If the number of arguments are less than 3, assign the

   %4th array element in errorCode to true

   if nargin<3

       errorCode(4)=true;

       errorCode(3)=false;

       errorCode(2)=false;

       errorCode(1)=false;        


   %Otherwise(if there are three parameters),    

   else

       %Check whether the first parameter is a string are not

       %and set the first array element with true, if the

       %first argument is string

       if ischar(name)

           errorCode(1)=~(ischar(name));        

       end

       %Check whether the second parameter is a numeric value are not

       %and set the second array element with true, if the

       %second argument is a numeric value


       if isnumeric(gpa)

           errorCode(2)=~(isnumeric(gpa));

       end


       %Check whether the third parameter is a logical value are not

       %and set the third array element with true, if the

       %third argument is a logical value false


       if islogical(enrollStatus)

           errorCode(3)=~(islogical(enrollStatus));

       end

   end  

end

You might be interested in
What is output? c = 1 sum = 0 while (c &lt; 10): c = c + 3 sum = sum + c print (sum)
Valentin [98]

Answer:

21

Explanation:

The values of c that make it into the loop are 1, 4, 7.

The values that are added to sum are 3 higher, i.e., 4,7 and 10.

The sum of those is 21.

p.s. why did you not run the program yourself?

3 0
3 years ago
A structure is private by default, but can be declared to be friend or private.
posledela
Structures can be accessed from anywhere within the module or class in which they are declared. A structure is Friend by default. To specify the accessibility in more detail, include Public, Protected, Friend, Protected Friend, or Private in the Structure statement. You must declare every data member of a structure.
4 0
3 years ago
A user states that when they power on their computer, they receive a "Non-bootable drive" error. The user works with external st
laila [671]

Answer:

B. Device boot order

Explanation:

The Device boot order makes a list of all the possible devices a system should check to in the operating system's boot files, as well as the proper sequence they should be in. Removable devices, hard drives, and flash drives are some devices that can be listed in the device boot order.

For the user whose computer displays a 'non-bootable drive' error, the device boot order would check all the devices listed to attempt booting from any of them. These devices might be in the order of removable discs, CD-ROM, hard drive. If all the options do not work, the computer would then do a Network boot. The order in which the devices are listed can be altered by the user.

8 0
4 years ago
First generation computers used vacuum tube technology true or false
Murrr4er [49]

I guees the correct option is True.

Vacuum Tubes technology was used in the first generation of computers.

7 0
3 years ago
Grades are numbers or ________ that show how a student performed in a course.
zloy xaker [14]
It’s either letters or percentages
8 0
3 years ago
Read 2 more answers
Other questions:
  • Chris has received an email that was entirely written using capitalization. He needs to paste this text into another document bu
    13·2 answers
  • If your computer will not turn on, What is something you can would you use to diagnose the problem?
    7·2 answers
  • What is the typical educational requirement for a non-entry level software programmer? high school diploma technical certificate
    10·1 answer
  • The advantage of a digital camera in taking nighttime photographs is that you can see
    10·1 answer
  • What is the most vulnerable information that should be protected to prevent unauthorized access to your online files and records
    8·1 answer
  • I put 100 points in here
    9·1 answer
  • PLEASE HELP ME WITH MY UNIT TEST!!!!!!!!!!!!!! I'M STRUGGLING AND I AM ESPECIALLY STUCK ON THIS ONE!!!!!!!!!!!!!!!!!!!!!! FOR BR
    7·1 answer
  • A. Modify the FitnessTracker class that includes data fields for a fitness activity, the number of minutes spent participating,
    12·1 answer
  • What is the scope of AS-26
    8·1 answer
  • This seems like a good time to ask the basic question, “How’s it going in class?” Feel free to offer constructive feedback about
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!