Computers and Technology
Computers and Technology, 18.03.2021 01:20, andr8aa

MATLAB: Augmented Matrices In this activity you will define an augmented matrix, find the number of pivot variables in the reduced system, and find the number of free variables in the solution to the linear system of equations.
Consider the linear system of equations:
2x + y = 3
x + 2y = 5
%Create the coefficient matrix C.
C = [2 1; 1 2]
%Create the column matrix d of constants. Remember, to create a column matrix, the rows are separated %by semicolons.
d = [3; 5]
%Create the augmented matrix [C I d]. Store this augmented matrix in Cd.
Cd = [Cd]
%Use the rref() command to reduce the augmented matrix. Store the reduced matrix in rowreducedCd, and %store the pivot variables in pivotvarsCd.
[rowreducedCd, pivotvarsCd] = rref(Cd)
%Warning: Look carefully at the reduced augmented matrix. If one of the pivot columns is the rightmost %column, the system of linear equation has no solution and no further analysis is possible.
%Do you run into any difficulties? Explain what is happening as a comment in your code.
%Use the size command to find the number of variables in the system of linear equations. Store this numbe %in numvars.
[numeqns, numvars] = size(C)
Store this number in numpivotvars.
%Use the size command to find the number of pivot variables.
[numrows, numpivotvars] = size(pivotvarsCd)
%Use subtraction to find the number of free variables in the solution to the system of linear equations.
%Store this number in numfreevars.
numfreevars = numvars - numpivotvars
Utilize the following linear system of equations for this activity.
X1 + 3x2 - 2x3 + 2xy = 0
2x1 + 6x2 - 5x3 - 2x4 + 4x3 - 3x6 = -1
x3 + 5x4 + 3x6 = 1
x1 + 3x2 + 4x4 + 2x5 + 9x6 = 3
Script
1 %Create the coefficient matrix A.
2
3 %Create the column matrix b of constants. Remember, to create a column matrix, the rows are separated
4 %by semicolons.
5
6 %Create the augmented matrix (A bl. Store this augmented matrix in Ab.
7
8 %Use the rref() command to reduce the augmented matrix. Store the reduced matrix in rowreducedAb, and
9 %store the pivot variables in pivotvarsAb.
10
11 %Warning: Look carefully at the reduced augmented matrix. If one of the pivot columns is the rightmos
12 %column, the system of linear equation has no solution and no further analysis is possible.
13
14 %Do you run into any difficulties? Explain what is happening as a comment in your code.
15
16 %Use the size command to find the number of variables in the system of linear equations. Store this nur
17 %in numvars.
18
19 %Use the size command to find the number of pivot variables. Store this number in numpivotvars.
20
21 %Use subtraction to find the number of free variables in the solution to the system of linear equations
22 %Store this number in numfreevars.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 12:00, daelinrobinson
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, amy7233
Afashion designer wants to increase awareness about her brand. which network can she use and why she can use the blank to blank her products online. answers for the first blank: internet, extranet, or intranet answers for the second blank: market, design, and export
Answers: 1
image
Computers and Technology, 24.06.2019 00:00, Amrinderkhattra
Visualizing a game of “tag” to remember the meaning of contagious
Answers: 3
image
Computers and Technology, 24.06.2019 01:00, bellamyciana
What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the file tab. click the file tab, then click print, or click the page layout tab. click the page layout tab, or click the review tab. click the review tab, or click the home tab?
Answers: 2
Do you know the correct answer?
MATLAB: Augmented Matrices In this activity you will define an augmented matrix, find the number of...

Questions in other subjects:

Konu
Mathematics, 20.10.2021 14:00