lu.m
shabarish
matlab
a month ago
247 B
5
Indexable
A=[1 1 1;2 1 3;3 4 -2];
b=[4;7;9];
[m,n]=size(A);
if m`=n
fprintf('the matrix must be a square matrix');
end
[L,U]=1u(A);
disp('L= ');
disp(L);
disp('U= ');
disp(U);
Y=L/b;
disp('Y= ');
disp(Y);
X=U/Y;
disp('X= ');
disp(X);
Editor is loading...
Leave a Comment