Respuesta :
Answer:
qualifyingIndex = (runnerGenders == 'M' & (runnerTimes < 8.2));
Explanation:
Because the problem specifies "logic array", one of the logical operators (i.e. &, |, ~) will be used. Because it asks for the runner to be male AND have a time less than 8.2, those are two the factors.
To break down the parts:
runnerGenders == 'M' searches the ['M', 'F', 'M', 'M', 'F'] array for all genders that are equal to male.
runnerTimes < 8.2 searches the [8.5, 9, 7.7, 7.9, 7.2] array for all times less than 8.2
By putting them together and using the logical operator & to represent "and", you have your answer of qualifyingIndex = (runnerGenders == 'M' & (runnerTimes < 8.2));
Note for future viewers: The OP did not include a screenshot of the original problem, but I had the same question on my MATLAB homework so I could easily reference what the array values were.
A logic array converts numeric values to logical values.
The logic array is: qualifyingIndex = (runnerGenders == 'M' & (runnerTimes < 8.2));
From the question, we are to test the following conditions
- Check if runnerGender indicates male i.e. M
- Check if runnerTImes is less than 8.2
So, we have:
- runnerGender == 'M'
- runnerTimes < 8.2
To combine both conditions, we use the AND operator.
So, we have: runnerGenders == 'M' & (runnerTimes < 8.2)
The above expression is to be saved in the qualifyingIndex variable
So, the complete statement is: qualifyingIndex = (runnerGenders == 'M' & (runnerTimes < 8.2));
Read more about logic array at:
https://brainly.com/question/20911455