Modifying an algorithm to perform BLAS1 operations
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Fluid Dynamics in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!