I used Gauss Jordan with partial pivoting to find the inverse of a matrix, input by user with a very basic code:
function invA = GJwithPP(A) [m,n] = size(