How to mod the coding to get Crout LU Decomposition with 8x8 matrix .

4 views (last 30 days)
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
narutorao
narutorao on 25 Apr 2014
the above program only can do 3x3 matrix for Crout LU Decomposition but I would like to change the program to do 8x8 matrix .

Sign in to comment.

Accepted Answer

Jan
Jan on 25 Apr 2014
Your code works properly for 8x8 matrices.
What is the problem?

More Answers (0)

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!