Question: Use the reduced row echelon form ( RREF ) to solve Ax = b , where A and b are indicated in Exercise 1 ,
Use the reduced row echelon form RREF to solve Ax b where A and b are indicated in Exercise and type your answer for the following in the Live Editor.
Display the reduced row echelon form and the pivot columns of the augmented matrix A b
Write a report to explain if there is a solution of Ax b based on rrefA b
Verify the RouchCapelli Theorem by comparing the rankA and rankA b
Call the function rankcomp and determine if Ax b is consistent.
Compare the result with Part A You should have the same conclusion.
Note: rankcomp gives you a new command to compare if rankA rankA b When you need to use the command, read the comments in the mfile function first and call the function by typing the name of the function, rankcompAB in the Live Editor where A and B are the two input matrices.
Open the template LSsolution. Use the RouchCapelli Theorem as a guide and code the function using an ifelseif statement do not use nested ifelse statements When LSsolution is called it should return the correct system type
In this exercise, you use the RREF and RouchCapelli Theorem to determine if Ax b is consistent. You may need the following commands for this exercise.
The command rrefA returns the reduced row echelon form of a matrix A
The command B pivcolsrrefAreturns B and pivcols, where matrix B rrefA and pivcols indicates pivot columns of A
The command rankA returns the rank of a matrix A
You also need two mfile functions rankcomp given and LSsolution template only In these functions, you need to know:
ifelse statement
If an expression is true, it executes statements block. Otherwise, it executes statements block.
if expression
statements block
else
statements block
end
ifelseif statement
If expression is true, it executes statements block. If not, check expression If expression is true, it executes statements block. If not, execute statements block.
if expression
statements block
elseif expression
statements block
else
statements block
end
Use the reduced row echelon form RREF to solve Ax b where A and b are indicated in Exercise and type your answer for the following in the Live Editor.
Display the reduced row echelon form and the pivot columns of the augmented matrix A b
Write a report to explain if there is a solution of Ax b based on rrefA b
Verify the RouchCapelli Theorem by comparing the rankA and rankA b
Call the function rankcomp and determine if Ax b is consistent.
Compare the result with Part A You should have the same conclusion.
Note: rankcomp gives you a new command to compare if rankA rankA b When you need to use the command, read the comments in the mfile function first and call the function by typing the name of the function, rankcompAB in the Live Editor where A and B are the two input matrices.
Open the template LSsolution. Use the RouchCapelli Theorem as a guide and code the function using an ifelseif statement do not use nested ifelse statements When LSsolution is called it should return the correct system type based on whether Ax b has a solution and how many. The function should outputreturnset systemtype to:
inc if the system is inconsistent and has no solution, or
conwithonesol if the system is consistent and has a unique solution, or
conwithinfsols if the system is consistent and has infinitely many solutions.
Note: You should include three inputs n A Ab for LSsolution, where n is the number of variables in the system of equation.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
