function d=determinante(A)
%calcola det utilizzando la formula di Laplace
if size(A,1)==1
    d=A(1,1);
else
    d=0;
    for j=1:size(A,1)
        d=d+A(1,j)*(-1)^(j+1)*determinante(minor(A,1,j));
    end
end