Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Our loop should be 1. R2-2R1__R2 and R3__R3-R1 we will see A is not invertible 2. R2__-R2 3. R1__R2-2R1 and R3__R3-R1 so we will see
Our loop should be 1. R2-2R1__R2 and R3__R3-R1 we will see A is not invertible
2. R2__-R2
3. R1__R2-2R1 and R3__R3-R1 so we will see 2nd row has no solution
U: upper triangular matrix.
I need a write a general Matlab code about; function [U,c]=GE_m[A,b] n=length (b) for k=1:n-1 use "while" ( %locate row that contains 1st nonzero % among n'n possible entries) If rk, no need to swap (% Ifr not=k, swap rth and kth row, % then go them GE If r>n disp (If all possible pivot entries have zero, print out "A is not invertible and the U and c returned are meaningless." Then quit out) Command window: 1) >> A=(1-1 2-1 2-2 3-3 1110 1-143] >> b= [-8-20 2 4]' transpose >>[U.c]=GE_m(A,b) >>x=ut_sys(U,c) check both funtion match 2) >> A=[111 221 112] >> b= [4 6 6]' transpose >>[U.c]=GE_m(A,b) should get U= [111 00-1 0 0 1] and c=[ 4, -2, 2]' transpose. I need a write a general Matlab code about; function [U,c]=GE_m[A,b] n=length (b) for k=1:n-1 use "while" ( %locate row that contains 1st nonzero % among n'n possible entries) If rk, no need to swap (% Ifr not=k, swap rth and kth row, % then go them GE If r>n disp (If all possible pivot entries have zero, print out "A is not invertible and the U and c returned are meaningless." Then quit out) Command window: 1) >> A=(1-1 2-1 2-2 3-3 1110 1-143] >> b= [-8-20 2 4]' transpose >>[U.c]=GE_m(A,b) >>x=ut_sys(U,c) check both funtion match 2) >> A=[111 221 112] >> b= [4 6 6]' transpose >>[U.c]=GE_m(A,b) should get U= [111 00-1 0 0 1] and c=[ 4, -2, 2]' transpose
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started