Question: MATHLAB QUESTION: (do not use loop) Write a function called hw2_problems that scores a multiple-choice test. The function has two inputs: row vectors of integers
MATHLAB QUESTION: (do not use loop)

Write a function called hw2_problems that scores a multiple-choice test. The function has two inputs: row vectors of integers of the same length. The first input called key has the correct answers, while the second input called answers has the student's solutions. The function returns a single output argument, a scalar containing the number of correct answers. If any of the two inputs is not a row vector or they have different lengths, the function returns minus 1. Hint: See what MATLAB does with something like this: = randi(4,1,20); == >> V = randi(4,1, 20); W >> res = (v w) res = 1x20 logical array 1 0 1 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
