The function returns "A" which is the entire matrix. If you want it to return the minimum value, it should return "min".
However, you shouldn't use "min" as a variable name, even if it's in a function with its own workspace that doesn't use the min function. Suppose you want to touble shoot the function in debug mode and you want to compute the min of "A" using min(A(:)), well you can't because min is a variable name.
Additionally, entering values using input without any constraints or input checks is very prone to errors. I suggest using a uitable or instructing the user to enter a variable that already contains the matrix values.