Answer:
correctGuess = (myNumber == userGuess);
Step-by-step explanation:
All you have to do is use the logical operator "==" to signify a relationship between myNumber and userGuess. Whenever the value of myNumber is equal to userGuess, MATLAB will input a "1" into the logical array. It will input a "0" when myNumber does NOT equal userGuess.
Example problem for EvaluateGuesses(3, [3, 4, 5])
correctGuess = (myNumber == userGuess);
The program checks for when 3 is equal to any number in the array userGuess. 3 only equals the first value, so the result is [1, 0, 0].
Therefore, the answer is correctGuess = (myNumber == userGuess);
(This is much simpler than what the other user said... this is most likely what your homework expects you to answer with.)