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
Pranavi (2026). crouts (https://www.mathworks.com/matlabcentral/fileexchange/183409-crouts), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2025b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0 |
