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

7 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by