%Encode A1, b1 and x1 as the vector of unknowns. A1 = b1 = syms xv1 = %Check the size of A, set it as m1 and n1 [m1,n1] = %Augment A and b to form AM1 AM1 = %Solve the Reduced Rwo Echelon of AM1. RREFA1 = %Collect the last column and set as bnew1, set the remaining elements as Anew1 bnew1= Anew1 = %Check if Anew is an identity matrix, if it is, bnew is the solution if Anew1 =eye(m1,n1) Root1 = bnew1 else display("No Solution") end %Augment the matrix A1 with the identity Matrix of the same size, set the result as AMI1 AMI1 = %Find the reduced row echelon form of AMI1, set the result as RREFAI1 RREFAI1= %Collect the second half of the matrix as AInew1, set the remaining elements as AIold1 AInew1= AIold1 = %Check if AIold1 is an identity matrix, if it is, AInew1 is the inverse %Encode A2, b2 and xv2 as the vector of unknowns. A2 = b2 = syms xv2 = %Check the size of A2, set it as m2 and n2 [m2,n2] = %Augment A2 and b2 to form AM2 AM2 = %Solve the Reduced Rwo Echelon of AM2. RREFA2 = %Collect the last column and set as bnew2, set the remaining elements as Anew2 bnew2= Anew2 = %Check if Anew is an identity matrix, if it is, bnew2 is the solution if Anew1 =eye(m2,n2) Root2 = bnew2 else display("No Solution") end %Augment the matrix A2 with the identity Matrix of the same size, set the result as AMI2 AMI2 = %Find the reduced row echelon form of AMI2, set the result as RREFAI2 RREFAI2= %Collect the second half of the matrix as AInew2, set the remaining elements as AIold2 AInew2= AIold2 = %Check if AIold2 is an identity matrix, if it is, AInew2 is the inverse
%Encode A1, b1 and x1 as the vector of unknowns. A1 = b1 = syms xv1 = %Check the size of A, set it as m1 and n1 [m1,n1] = %Augment A and b to form AM1 AM1 = %Solve the Reduced Rwo Echelon of AM1. RREFA1 = %Collect the last column and set as bnew1, set the remaining elements as Anew1 bnew1= Anew1 = %Check if Anew is an identity matrix, if it is, bnew is the solution if Anew1 =eye(m1,n1) Root1 = bnew1 else display("No Solution") end %Augment the matrix A1 with the identity Matrix of the same size, set the result as AMI1 AMI1 = %Find the reduced row echelon form of AMI1, set the result as RREFAI1 RREFAI1= %Collect the second half of the matrix as AInew1, set the remaining elements as AIold1 AInew1= AIold1 = %Check if AIold1 is an identity matrix, if it is, AInew1 is the inverse %Encode A2, b2 and xv2 as the vector of unknowns. A2 = b2 = syms xv2 = %Check the size of A2, set it as m2 and n2 [m2,n2] = %Augment A2 and b2 to form AM2 AM2 = %Solve the Reduced Rwo Echelon of AM2. RREFA2 = %Collect the last column and set as bnew2, set the remaining elements as Anew2 bnew2= Anew2 = %Check if Anew is an identity matrix, if it is, bnew2 is the solution if Anew1 =eye(m2,n2) Root2 = bnew2 else display("No Solution") end %Augment the matrix A2 with the identity Matrix of the same size, set the result as AMI2 AMI2 = %Find the reduced row echelon form of AMI2, set the result as RREFAI2 RREFAI2= %Collect the second half of the matrix as AInew2, set the remaining elements as AIold2 AInew2= AIold2 = %Check if AIold2 is an identity matrix, if it is, AInew2 is the inverse
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
What to input here to run properly?
%Encode A1, b1 and x1 as the vector of unknowns.
A1 =
b1 =
syms
xv1 =
%Check the size of A, set it as m1 and n1
[m1,n1] =
%Augment A and b to form AM1
AM1 =
%Solve the Reduced Rwo Echelon of AM1.
RREFA1 =
%Collect the last column and set as bnew1, set the remaining elements as Anew1
bnew1=
Anew1 =
%Check if Anew is an identity matrix, if it is, bnew is the solution
if Anew1 =eye(m1,n1)
Root1 = bnew1
else
display("No Solution")
end
%Augment the matrix A1 with the identity Matrix of the same size, set the result as AMI1
AMI1 =
%Find the reduced row echelon form of AMI1, set the result as RREFAI1
RREFAI1=
%Collect the second half of the matrix as AInew1, set the remaining elements as AIold1
AInew1=
AIold1 =
%Check if AIold1 is an identity matrix, if it is, AInew1 is the inverse
%Encode A2, b2 and xv2 as the vector of unknowns.
A2 =
b2 =
syms
xv2 =
%Check the size of A2, set it as m2 and n2
[m2,n2] =
%Augment A2 and b2 to form AM2
AM2 =
%Solve the Reduced Rwo Echelon of AM2.
RREFA2 =
%Collect the last column and set as bnew2, set the remaining elements as Anew2
bnew2=
Anew2 =
%Check if Anew is an identity matrix, if it is, bnew2 is the solution
if Anew1 =eye(m2,n2)
Root2 = bnew2
else
display("No Solution")
end
%Augment the matrix A2 with the identity Matrix of the same size, set the result as AMI2
AMI2 =
%Find the reduced row echelon form of AMI2, set the result as RREFAI2
RREFAI2=
%Collect the second half of the matrix as AInew2, set the remaining elements as AIold2
AInew2=
AIold2 =
%Check if AIold2 is an identity matrix, if it is, AInew2 is the inverse
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education