MATLAB question The question is below Please tell me the 3 r
MATLAB question
The question is below. Please tell me the 3 right answers about this question.
Jimmy made the following code to output the L. d. and U matrix in one function. Select exactly 3 line numbers corresponding to mistake in the code. Function-file: gausspivot_forwardsub. m function [L d U]=gausspivot_forwardsub(A, b) [m, n]=size(A); U=[A b];L=eye(n, n); for ii=1:n factor = -U(jj, iii)/U(ii, ii); L(jj, ii) = - factor; U(jj, ii: end) = U (jj, iii: end) + factor * U (ii, ii: end); end end d=U (: n + 1: end); U=U (1: n, :) 3 5 6 1 7 11 4 12 8 9Solution
6: factor =-U(jj,ii)/U(ii,ii)
8: U(jj,ii:end)=U(jj,ii:end)+factor*U(ii,ii:end);
11:d=U(;,n+1:end);
