function [Y] = gaussRecursivo( A )
%Gauss Recursivo
% Genera una matriz expandida
% triangular superior al aplicarse Gauss de manera recursiva
dim = size(A);
if dim(1) ~= 1
for i =2:dim(1)
if A(1,1) == 0
disp('Se ha necesita pivotaje parcial');
mayor=0;
index=0;
for j = 1:dim(1)
if A(1,j) > mayor
index=j;
mayor = A(1,j);
end
end
S = A(1,:);
T = A(index,:);
A(index,:) = S;
A(1,:) = T;
end
mul = A(i,1)/A(1,1);
A(i,:) = A(i,:) - mul*A(1,:);
end
B = A(2:dim(1),2:dim(2));
B = gaussRecursivo(B);
C = [zeros(dim(1)-1,1),B];
Y = [A(1,:);C];
else
Y=A;
end
end