Math 18 MATLAB Assignment 2
Exercise 2.1 Cx= b x= [ 1.0714 1.2143
1.5714 ]
INPUT: >> x = C\d
OUTPUT: x =
1.0714 1.2143
1.5714
OUTPUT: ans =
12.2143 9.2143 8.2143
11.5000 8.5000 7.5000
3.2857 0.2857 -0.7143
Exercise 2.2
INPUT: >> x= [-10 4; 15 -6]
OUTPUT: x =
-10 4
15 -6
INPUT: >> y=[0 0]
OUTPUT: y =
0 0
INPUT: >> h=x/y
OUTPUT: Warning: Rank deficient, rank = 0, tol = 0.000000e+00.
h =
0
0
My solution is the same. The error exists because the augmented matrix, h, is inconsistent because the last column contains a pivot.
Exercise 2.3
INPUT: >> rref ([C d])
OUTPUT: ans =
1 -3 2 0
0 0 0 0
0 0 0 0
There are 2 free variables.
Exercise 2.4
The columns all add up to one because each additive represents a percentage. 1 is 100 % and each row within the additive of 1 represents a factor of that 1. Exercise 2.5
The left-hand side of the equation coefficients are scalars of the variables f, t, c, m, and b. These coefficients represent A in the equation Ax=b. The variables f, t, c, m, and b are within the vector x in Ax=b, their letters represent the Farmer, Tailor, Carpenter, Miner, and Slack Bob respectively. Vector x also represents what these variable produce, Food, Clothes, Housing, Energy, and Alcohol respectively. Matrix A represents the percentage of consumption these variables of vector x represent. The right-hand side of the equation, b, represent the total price of each good of Food, Clothes, Housing, Energy, and Alcohol respectively.
Exercise 2.6
INPUT: >> d=[0
0
0
0
0]
INPUT: y= [x d]
OUTPUT: y =
Columns 1 through 4
-0.7500 0.1500 0.2500
0.1800
0.1500 -0.7200 0.1800
0.1700
0.2200 0.1900 -0.7800
0.2200
0.2000 0.1500 0.2000
-0.7200
0.1800 0.2300 0.1500 0.1500
Columns 5 through 6
0.2000 0 0.0500 0 0.1000 0
0.1500 0
-0.5000 0 INPUT : >> rref([y])
OUTPUT:
ans = Columns 1 through 4
1.0000 0 0 0 0 1.0000 0 0
0 0 1.0000 0
0 0 0 1.0000
0 0 0 0
Columns 5 through 6
-0.8025 0
-0.5919 0
-0.7108 0
-0.7520 0
0 0
General Solution: p1=.8025b, p2=.5919b, p3= .7108b, p4=.7520, p5=free
The highest priced commodity is food and the lowest priced
Bob, in which Slacker Bob is a free variable. Slacker Bob has the highest income because the other occupations are just fractions of his income.
If Slacker Bob sells $40,000 a year, the corresponding Gross incomes are true, Farmer=$32100, Tailor=$23676, Carpenter=$28432, and Miner=$30080.
Exercise 2.7
0 1/2 0 0; 0 1/2 0 0 1/2; 1/3 0 1/3 0
1/3; 0 0 1 0 0]
OUTPUT:
L =
Columns 1 through 4
0 0.2500 0.2500 0.2500
0.5000 0 0.5000 0
0 0.5000 0 0
0.3333 0 0.3333 0
0 0 1.0000 0
Column 5
0.2500
0
0.5000
0.3333
0
OUTPUT: j =
Columns 1 through 3
-1.0000 0.2500 0.2500
0.5000 -1.0000 0.5000
0 0.5000 -1.0000
0.3333 0 0.3333
0 0 1.0000
Columns 4 through 5
0.2500 0.2500
0 0
0 0.5000
-1.0000 0.3333
0 -1.0000
INPUT: f =
0
0
0
0
0
INPUT: >> w= [j f]
OUTPUT: w = Columns 1 through 3
-1.0000 0.2500 0.2500
0.5000 -1.0000 0.5000
0.3333 0 0.3333
Columns 4 through 6
0.2500 0.2500 0
0 0 0
0 0.5000 0
-1.0000 0.3333 0
INPUT: >> rref (w)
OUTPUT:
ans =
0 1 0 0 -1 0
0 0 1 0 -1 0
0 0 0 1 -1 0
0 0 0 0 0 0
Our motto is deliver assignment on Time. Our Expert writers deliver quality assignments to the students.
Get reliable and unique assignments by using our 100% plagiarism-free services.
The experienced team of AssignmentHippo has got your back 24*7. Get connected with our Live Chat support executives to receive instant solutions for your assignment problems.
We can build quality assignments in the subjects you're passionate about. Be it Programming, Engineering, Accounting, Finance and Literature or Law and Marketing we have an expert writer for all.
Get premium service at a pocket-friendly rate. At AssignmentHippo, we understand the tight budget of students and thus offer our services at highly affordable prices.
Get instant assignment help Tap to Chat
Get instant assignment help