A few hints
Instead of using the left division operator to solve a linear equation system, you can do it "by hand". Let us try this using the equation system given by Equation (2.6) with the solution given in Equation (2.9). First we need to calculate the inverse of A (which exists). This is done via the inv
function:
octave:120>inverse_A = inv(A) inverse_A = 0.2500 -0.1250 -1.0000 0.5000 -0.5000 -1.0000 0.0000 -0.2500 -1.0000
We can now simply perform the matrix multiplication A 1y to get the solution:
octave:121>inverse_A*y ans = -1.6250 -2.5000 -2.2500
This output is similar to the output from Command 94. Now, when Octave performs the left division operation, it does not first invert A
and then multiply that result with y
. Octave has many different algorithms it can use for this operation, depending on the specific nature of the matrix. The results from these algorithms are usually more precise and much quicker than performing the individual steps. In this particular example, it...