Question: Refer to the Backward Substitution function given below: function [x] = myBackwardSub(A, b) [nRows, nCols] = size(A); x = zeros(nRows, 1); if nRows ~= nCols

Refer to the Backward Substitution function given below:

function [x] = myBackwardSub(A, b)

[nRows, nCols] = size(A);

x = zeros(nRows, 1);

if nRows ~= nCols

disp('Must be a square coefficient matrix');

return;

else

n = nRows; end x(n) = b(n)/A(n,n);

for i = %

x(i) = b(i);

for j = %

% WHAT GOES HERE 1

end

% WHAT GOES HERE 2

end 31. What looping array should i get? a) 1:n b) 1:n-1 c) i+1:n d) n:-1:1 e) n-1:-1:1 32. What looping array should j get? a) 1:n b) 1:n-1 c) i+1:n d) n:-1:1 e) n-1:-1:1 33. What should replace the comment % WHAT GOES HERE 1 a) x(i) = x(i) A(i,j)*x(j); b) x(i) = x(i) / A(i,i); c) x(j) = x(j) A(i,j)*x(i); d) x(j) = x(j) / A(j,j); e) x(i) = x(i) x(j) / A(i,j); 34. What should replace the comment % WHAT GOES HERE 2? a) x(i) = x(i) A(i,j)*x(j); b) x(i) = x(i) / A(i,i); c) x(j) = x(j) A(i,j)*x(i); d) x(j) = x(j) / A(j,j); e) x(i) = x(i) x(j) / A(i,j);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!