methlab2.docx

# methlab2.docx

This preview shows pages 1–3. Sign up to view the full content.

MATLAB 2 – Systems of Linear Equations Exercise 2.1 a) d = [-1;2;3] d = -1 2 3 b) x = C\d x = -0.7778 -1.7593 0.4630 c) C*x-d ans = 1.0e-15 * -0.4441 -0.4441 0 Exercise 2.2 C = [-10 4; 15 -6] C = -10 4 15 -6 d = [0;0] d = 0 0 x = C\d Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.480297e- 17. x = 0 0 There are 2 free variables in the solution. An error occurs when using x = C\d because d = [0;0] there are infinitely solutions. Exercise 2.3 A = [1 -3 2; -2 6 -4; 4 -12 8] A = 1 -3 2 -2 6 -4 4 -12 8 b = [0;0;0] b = 0 0 0 rref([A b]) ans = 1 -3 2 0 0 0 0 0 0 0 0 0 There are 3 free variables required, X 1 and X 2 Exercise 2.4 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Because it totals 100% of their money spent. Exercise 2.5 The left-hand side of the equation is the total costs/expenses of goods by each citizen. The right-hand side represents the gross income of each citizen. The total expenses should equal the total income. Exercise 2.6 a) C = 0.2500 0.1500 0.2500 0.1800 0.2000 0.1500 0.2800 0.1800 0.1700 0.0500 0.2200 0.1900 0.2200 0.2200 0.1000 0.2000 0.1500 0.2000 0.2800 0.1500 0.1800 0.2300 0.1500 0.1500 0.5000 I = eye(5) I = 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 b) rref([(C-I) d]) ans = 1.0000 0 0 0 -0.8025
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern