crout

Version 1.0.0 (21 KB) by Hansika
c
0 Downloads
Updated 16 Mar 2026

View License

clear
clc
function [L,U] = crout(A)
n = size(A,1);
L = zeros(n);
U = eye(n);
for j = 1:n
for i = j:n
sum = 0;
for k = 1:j-1
sum = sum + L(i,k)*U(k,j);
end
L(i,j) = A(i,j) - sum;
end
for i = j+1:n
sum = 0;
for k = 1:j-1
sum = sum + L(j,k)*U(k,i);
end
U(j,i) = (A(j,i)-sum)/L(j,j);
end
end
end

Cite As

Hansika (2026). crout (https://www.mathworks.com/matlabcentral/fileexchange/183416-crout), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2025b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0