Solve for x in (A^k)*x=b (sequentially, LU factorization)
조회 수: 15 (최근 30일)
이전 댓글 표시
Without computing A^k, solve for x in (A^k)*x=b.
A) Sequentially? (Pseudocode)
for n=1:k
x=A\b;
b=x;
end
Is the above process correct?
B) LU factorizaion?
How is this accompished?
댓글 수: 0
채택된 답변
Walter Roberson
2011년 11월 24일
http://www.mathworks.com/help/techdoc/ref/lu.html for LU factorization.
However, I would suggest that LU will not help much. See instead http://www.maths.lse.ac.uk/Personal/martin/fme4a.pdf
댓글 수: 1
Nicholas Lamm
2018년 7월 9일
편집: Rena Berman
2018년 7월 9일
A) Linking to the documentation is about the least helpful thing you can do and B) youre not even right, LU decomposition is great for solving matrices and is even cheaper in certain situations.
추가 답변 (1개)
Derek O'Connor
2011년 11월 28일
Contrary to what Walter says, LU Decomposition is a great help in this problem. See my solution notes to Lab Exercise 6 --- LU Decomposition and Matrix Powers
Additional Information
Here is the Golub-Van Loan Algorithm for solving (A^k)*x = b
[L,U,P] = lu(A);
for m = 1:k
y = L\(P*b);
x = U\y;
b = x;
end
Matlab's backslash operator "\" is clever enough to figure out that y = L\(P*b) is forward substitution, while x = U\y is back substitution, each of which requires O(n^2) work.
Total amount of work is: O(n^3) + k*O(n^2) = O(n^3 + k*n^2)
If k << n then this total is effectively O(n^3).
댓글 수: 4
Derek O'Connor
2011년 11월 28일
Oh dear. It has just struck me that this may be a homework problem and I have given the game away.
Sheraline Lawles
2021년 2월 22일
Just a note... sadly, the above link to Derek O'Connor's webpage is no longer active.
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Algebra에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!