Find the variable vector x using the LU decomposition of the following linear system. (Please also write Matlab programming code.)
1 次查看(过去 30 天)
显示 更早的评论
Find the variable vector x using the LU decomposition of the following linear system. (Please also write Matlab programming code.)
1 个评论
Dyuman Joshi
2023-5-13
Please show what have you tried yet.
If you need help to begin with, check out the LU matrix factorization documentation - lu
回答(1 个)
Sai
2023-5-17
I understand that you wanted to determine the variable x using LU decomposition method.
Please refer to the below code snippet for the same
A = [-1 1 2; 1 2 -1; -2 -2 2]
c = [7;2;0]
[L,U] = lu(A)
%In LU Decomposition, LUX = c
D = L*U
x = (D)\c
Please refer to the following documentation link for more information on LU decomposition
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!