How to mod the coding to get Crout LU Decomposition with 8x8 matrix .
4 views (last 30 days)
Show older comments
Hi , I have tried modifying the coding below to suite my problem which is Crout LU Decomposition with 8x8 matrix .
code :
function [L, U]=LUdecompCrout(A)
[R, C]= size(A);
for i=1:R
L(i,1)=A(i,1);
U(i,i)=1;
end
for j=2:R
U(1,j)=A(1,j)/L(1,1);
end
for i=2:R
for j=2:i
L(i,j)=A(i,j)-L(i,1:j-1)*U(1:j-1,j);
end
for j=i+1:R
U(i,j)=(A(i,j)-L(i,1:i-1)*U(1:i-1,j))/L(i,i);
end
end
Thanks in advance
2 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!