Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C chegg study louided 50 x C Math 1303 1zc3. 5umm x Math 1BU3/1zc3 5umme x Matla

ID: 3845934 • Letter: C

Question

C chegg study louided 50 x C Math 1303 1zc3. 5umm x Math 1BU3/1zc3 5umme x Matlab Tutorial for Lab x C Secure www child 2.php? assign 10 1 (b) 2/2 1(b) l(b) Problem #2 Use the create matrix function from the tutorial tile, along with a tiunct on a (J) (which you wil have to creatc) o produce the following 17 x 7 matrix. Then find its determinant. 2 3 1 1 1 1 1 1 1 1 1 2 3 4 1 1 1 1 1 1 1 1 2 3 4 5 1 1 1 1 1 1 1 1 1 2 3 4 5 6 1 1 1 1 1 1 1 1 2 3 4 5 6 7 1 1 1 1 1 1 1 2 3 4 5 6 7 8 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 10 1 1 1 1 1 1 2 3 4 5 6 7 8 9 10 11 1 1 1 2 3 4 5 6 7 8 9 10 II 12 1 1 1 2 3 4 5 6 7 8 9 10 II 12 13 1 1 I 2 3 4 5 6 7 8 9 10 ll 12 13 14 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 3 4 5 6 7 8 9 10 12 13 14 15 16 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Problem ust Save Submit Problem 2 or Grading #2 Your Answer: 2092278988800 Your Mark Problem #3 Consider the followiug fuuction Type here to search 2101 AM 2017-U6-04

Explanation / Answer

main.m

L=input('enter elements:');

[ x ] = CreateMatrix( L );

fprintf('displaying lower triangularmatrix');

disp(x)

[ B ] = modifymatrix( x );

fprintf('displaying B');

disp(B);

CreateMatrix.m

function [ x ] = CreateMatrix( L )

S=size(L);

m=S(1);

if S(1)~=S(2)

error('matrix mast be square')

end

x=ones(1,m);

x(1,1)=b(1)./L(1,1);

%bacward substitution

for k=2:m

  

x1=1/L(k,k).*(b(k)-sum(L(k,k-1:-1:1).*x(k-1:-1:1)));

x(1,k)=x1;

end

x=x';

end

modifymatrix.m

function [ B ] = modifymatrix( x )
%UNTITLED4 Summary of this function goes here
% Detailed explanation goes here
S=size(x);
m=S(1);
B=zeros(m,m);
for i=1:m
for j=1:m
if(x(i,j)>=0)
B(i,j)=x(i,j)*2;
end
if(x(i,j)<0)
B(i,j)=x(i,j)+5;
end

  
  
end
end
end