103k views
12 votes
What is the value in y2 when the code show below executes?

x1 = [ 5 3 1 7 9]; [y1 y2] = min(x1)

1 Answer

8 votes

Answer:

y2 = 3

Step-by-step explanation:

This question needs us to give the value of y2 when we run this code in the question.

By min(X1) it is asking for the minimum value in the list of values that we have in the question.

Y1 is the first minimum value in the list and it is = 1

Our answer of interest in this solution is to, which is the second minimum value in the list after Y1

Therefore y2 = 3

Thank you!

User Jim Blum
by
4.8k points