these are my mfiles for Lu decomposition with partial pivoting and substitution
1.LUdecomp.m
function [x]=LUdecomp(a,b,n,tol,er,x)
for i=1:n
o(i)=0;
s(i)=0;
end
er=0;
decompose(a,n,tol,o,s,er)
if er~=-1
substitute(a,o,n,b,x);
end
end
2.decompose.m
function...