Consider the following MATLAB script. What will the ending value of the variable k be (circle your answer below)?
A = [4, 2, 9, -10, 6];
k = 1;
if sum(A) > max(A)
k = k + sum(A) – max(A);
end
k
a. k = -1
b. k = 1
c. k = 0
d. k = 2A = [4, 2, 9, -10, 6];
k = 1;
if sum(A) > max(A)
k = k + sum(A) – max(A);
end
k
a. k = -1
b. k = 1
c. k = 0
d. k = 2 A = [4, 2, 9, -10, 6];
k = 1;
if sum(A) > max(A)
k = k + sum(A) – max(A);
end
k
a. k = -1
b. k = 1
c. k = 0
d. k = 2 variable k MATLAB Answers — New Questions