Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

is it possible to get a full working out with answers please

1 answer below »
Answered Same Day Aug 06, 2021

Solution

Intakhab answered on Aug 12 2021
133 Votes
2 a (i)
Matlab code:
syms x y z
A=[2,6,-2;
1,5,1;
8,8,-3]
B=[-6;
-3;
-3]
C=[A B] %Augmented matrix
Output
A =
2 6 -2
1 5 1
8 8 -3
B =
-6
-3
-3
C =
2 6 -2 -6
1 5 1 -3
8 8 -3 -3
2 a (ii)
MATLAB CODE:
syms x y z
A=[2,6,-2;
1,5,1;
8,8,-3]
B=[-6,-3,-3]'
C=[A B]
n=3
for j = 1:(n-1)
for i= (j+1) : n
mult = C(i,j)/C(j,j) ;
for k= j:n+1
C(i,k) = C(i,k) - mult*C(j,k) ;
C
end
end
end
for p = n:-1:1
for r = p+1:n
x(p) = C(p,r)/C(p,r-1)
end
end
OUTPUT
C =
2 6 -2 -6
0 2 2 0
0 0 21 21
2 a (iii)
The direct available code for reduction into echelon form is
ef
R =
1 0 0 1
0 1 0 -1
0 0 1 1
This is the reduced form
2 a(v)
MATLAB CODE
function [ L, U, X ]=LU_Crout(A,b)
A=[2,6,-2;1,5,1;8,8,-3]
=[-6;-3;-3]
n = size(A);
syms temp;
L = sym(zeros(n(1)));
U = sym(eye(n(1)));
T = sym(zeros(n(1)));
for i = 1:n(1)
for j = 1:n(1)
if( i>= j )
L(i,j) = temp;
else U(i,j) = temp;
end
for k = 1:n(1)
T(i,j) = T(i,j) + L(i,k)*U(k,j);
end
eq_ans = solve(T(i,j) == A(i,j), temp);
T(i,j) = eq_ans;
if( i>= j )
L(i,j) = T(i,j);
else U(i,j) = T(i,j)
end
end
end
Z = L\
X = U\Z
end
OUTPUT
A =
2 6 -2
1 5 1
8 8 -3
=
-6
-3
-3

U =

[ 1, 3, 0]
[ 0, 1, 0]
[ 0, 0, 1]


U =

[ 1, 3, -1]
[ 0, 1, 0]
[ 0, 0, 1]


U =

[ 1, 3,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here