Recursive Solution Of System Of lInear Equations
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Steven Lord
2018-5-21
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dynamic System Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!