Question: 12. (5 points) Answer the questions below about this program: function uyfunctionB A -[2 1 3; 4 2 1; 11 1: for k-1:n-1 swap =


12. (5 points) Answer the questions below about this program: function uyfunctionB A -[2 1 3; 4 2 1; 11 1: for k-1:n-1 swap = k; for i-k+1:n if abs (A(i,k)) > abs (Amax) Amax = A(i,k); swap- end end if svap old-pivot (1, :) = A(k, :) ; A(swap,:- old_pivot(1,:: end for ik+1:n for j*l:n end end end q = q*A(n , n) ; fprintf ('q = %8.6f Vn'.q) a) What mathematical problem is solved by this code?, b)what numerical method is used to solve the problem?, c)what does the variable n represent?, d) what does the variable q represent?, e) what does the variable s represent?, f) what is the output of the last line in the code? (provide the numerical value) 12. (5 points) Answer the questions below about this program: function uyfunctionB A -[2 1 3; 4 2 1; 11 1: for k-1:n-1 swap = k; for i-k+1:n if abs (A(i,k)) > abs (Amax) Amax = A(i,k); swap- end end if svap old-pivot (1, :) = A(k, :) ; A(swap,:- old_pivot(1,:: end for ik+1:n for j*l:n end end end q = q*A(n , n) ; fprintf ('q = %8.6f Vn'.q) a) What mathematical problem is solved by this code?, b)what numerical method is used to solve the problem?, c)what does the variable n represent?, d) what does the variable q represent?, e) what does the variable s represent?, f) what is the output of the last line in the code? (provide the numerical value)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
