x=input("Enter the matrix") [m,n]=size(x) if m==n then if detr(x)==0 disp("Inverse does not exist") else a=inv(x) disp("Determinant is:",detr(x)) disp("Inverse is:",a) end else disp("Matrix is not square") end