Question A2.7: Determine the solution of the following linear simultaneous ...
Determine the solution of the following linear simultaneous equations using MATLAB.
A=\left[\begin{matrix}5 & 2 & 3 \\4 & 5 & 4 \\ 7 & 0 & 9 \end{matrix} \right], B=\left\{\begin{matrix} 10 \\ 13 \\ 16 \end{matrix} \right\}
>> A = [5 2 3;4 5 4;7 0 9] % define matrix A
A =
5 2 3
4 5 4
7 0 9
>> b = [10 13 16] % define b vector as a row
b =
10 13 16
>> A\b’ % find solution by taking transpose of b, that is, column
vector
ans =
1.0000
1.0000
1.0000
It makes use of Gaussian elimination method.