na-lab-lu

Version 1.0.0 (1.13 KB) by Akshay
code
2 Downloads
Updated 14 Nov 2022

View License

clc;
A=input("enter matrix");
B=input("enter rhs");
n=length(B);
m=eye(n);
x=zeros(n,1);
% i=column j=row
for i=1:n-1
for j=i+1:n
m(j,i)=A(j,i)/A(i,i);
A(j,:)=A(j,:)-m(j,i)*A(i,:);
end
end
L=m;
U=A;
y=inv(L)*B;
x=inv(U)*y;
disp(x);

Cite As

Akshay (2024). na-lab-lu (https://www.mathworks.com/matlabcentral/fileexchange/120403-na-lab-lu), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2022b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0