Recursive Solution Of System Of lInear Equations

7 views (last 30 days)
Harel Harel Shattenstein
Harel Harel Shattenstein on 21 May 2018
Answered: Steven Lord on 21 May 2018
Given a square upper triangular matrix A and a solution column b. Write a recursive algorithm to find the vector x
So the end case is at the last coefficient we have
x_n=b(end)./A(end,end)
what will be the recursive call? how can I save a vector in a recursive function? it will start over and erase the vector?

Answers (1)

Steven Lord
Steven Lord on 21 May 2018
If I were to give you the system of equations:
A + B = 5
2*B = 4
you can use the last equation to determine B. Once you do, that equation has no more information to provide you, so you can eliminate it from your system of equations. How would you solve the remaining equation(s) in the system? [I'm not asking for the value of A, I'm asking how you would determine the value of A.]
Once you've answered that question, can you generalize that process to the following system of equations?
A + B + C = 8
2*B - C = 7
3*C = 3

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by