%--------------------------------------------
%--------------------------------------------
% Esta función resuelve el sistema de ecuaciones
% K*x=f mediante el solver directo LU
%--------------------------------------------
%--------------------------------------------

function x  =  MyLUSolver(K,f)
%---------------------------------------
% Factorización LU (1er paso)
%---------------------------------------
[L,U]         =  MyLUFactorisation(K);
%---------------------------------------
% resolvemos L*y=f (2nd paso)
%---------------------------------------
y             =  MyLowerSubstitution(L,f);             
%---------------------------------------
% resolvemos U*x=y (3rd paso)
%---------------------------------------
x             =  MyUpperSubstitution(U,y);
  
end
