Modifying an algorithm to perform BLAS1 operations
조회 수: 2 (최근 30일)
이전 댓글 표시
I am asked to modify the following algorithm (LU decomposition of A) to perform BLAS1 operations instead of scalar operations. How can this be done? How will the algorithm be modified?
function [L,U] = ColLU(A)
n = size(A);
for k = 1:n-1
piv = A(k, k);
for i = k+1:n
A(i, k) = A(i, k)/piv;
end
for j = k+1:n
for i = k+1:n
A(i,j) = A(i,j)- A(i, k) * A(k, j);
end
end
end
U = triu(A)
L = tril(A, -1) + eye(n)
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!