Consider the system of simultaneous equations:

x1 + 3x2 + 5x3 + 2x4 = 7

2x1 ? 4x2 + 7x3 ? 3x4 = ?3

?4x2 ? 7x3 + 3x4 = ?1

5x1 ? 3x2 + 2x3 + 1x4 = 0

which in matrix notation we could write as Mx = c.

(a) Write two Matlab assignment statements for the matrices that correspond to M and c in the

matrix notation indicated.

(b) What Matlab statement would you use to solve this system of linear equations?

(c) Type your statements into Matlab and obtain the solution. What is the solution?

Respuesta :

CPED

Answer:

System of linear equations is solved below and explained in detail.

Explanation:

Part a:

M = [1  3  5  2; 2  -4  7  -3; 0  -4  -7  3; 5  -3  2  1];

c =  [7;  -3;  -1;  0];

Part b:

The statement used for the solution of system of linear equation will be:

X = linsolve(M,c)

where X will give the values of x1, x2, x3, x4 respectively.

Part c:

The system is solved in matlab using above equation and the results are attached in a file.

The values for X are:

x1 = -2/7

x2 = 3/7

x3 = 4/7

x4 = 11/7

Ver imagen CPED