function m = minorMatrixAlt(M,r,c)
dim = length(M);

inter = [M(1:(r-1),:); M(r+1:dim,:)];
m = [inter(:,1:(c-1)), inter(:,(c+1):dim)];
end
