matlab 2

# matlab 2 - M atlab Assignment#2 Exercise 2.1(a 2x1 x2 x3=8...

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

Matlab Assignment #2 Exercise 2.1 (a) 2x1+x2+x3=8 X1+2x2+3x3=9 3x1-x3 (b) C=[2 1 5; 1 0 6; -6 2 4] d=[-1 2 3] Code: x=C \d Output: x = -0.7778 -1.7593 0.4630 (C) Code: C*x-d

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

View Full Document
Output: ans = 1.0e-015 * -0.4441 0 0 Exercise 2.2 Code: C=[-10 4; 15 -6] d=[0;0] x=C \d Output: Warning: Matrix is singular to working precision. x = NaN NaN Because there is infinite number of answers
Exercise 2.3 (a) Code: C=[1 -3 2; -2 6 -4; 4 -12 8] d=[0;0;0] Output: rref([C d]) ans = 1 -3 2 0 0 0 0 0 0 0 0 0 2 free variables are required. Exercise 2.4 Since it is closed economy, no goods leave or enter the economy. Therefore, all adds up to 1. Exercise 2.5 The left side is the total consumption of each person in town. And the right side is each person’s total consumption.

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

View Full Document
(a) Code: C = [0.25 0.15 0.25 0.18 0.20; 0.15 0.28 0.18 0.17 0.05; 0.22 0.19 0.22 0.22 0.10; 0.20 0.15 0.20 0.28 0.15; 0.18 0.23 0.15 0.15 0.50] Output: 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
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

matlab 2 - M atlab Assignment#2 Exercise 2.1(a 2x1 x2 x3=8...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online