Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This challenge activity uses a 3rd party app. Though your activity may be record

ID: 3938123 • Letter: T

Question

This challenge activity uses a 3rd party app. Though your activity may be recorded, a refresh may be required to update the banner to the left. Assign num matches with the number of elements in user Values that equal match Value. Ex: If match Value = 2 and userVals = [2, 2, 1, 2]. then num Matches = 3. function num Matches = Find Values (user Values, match Value) % user Values: User defined array of values % match Value: Desired match value array Size =4; % Number of elements in user Values array num Matches = theta; % Number of elements that equal desired match value % Write a for loop that assigns num Matches with the number of % elements in user Values that equal match Value.

Explanation / Answer

function numMatches = FindValues(userValues,matchValue)

arraySize =4

numMatches = 0

count=1