By user-defined function, I suspect that they are just asking you to create a function with a specific signature (input and output parameters). Something like
function [volume] = diskvolume(param1, param2)
I don't know what your input parameters should be perhaps none perhaps one or more. The above are just example inputs. Note how we define the output parameter volume. Since we have defined a function called diskvolume, then it gets saved to a file called diskvolume.m.
Now in your code, you precede the function signature with two lines of code. This will create an error as you can only include comments before the function signature. So you can delete these two lines from your code.
Note also the input parameter (for your function) is an x but then you overwrite it with the for loop. Do you mean to do this? Perhaps you don[t need an input parameter at all (especially since your code prompts the user for some inputs).
outerradius = ('Enter function for the outer radius')
innerradius = input('Enter function for the inner radius')
for x = minx:maxx
diskvolume = int(pi*((outerradius^2)-(innerradius)^2))
you are setting a local variable to the same name as the function. This will cause an error and so use the output parameter of volume instead. And please clarify what you are doing here. You have a for loop with a x iterating variable but you don't use it in the calculation of the volume. How should they be used? Do you want to be summing up a volume on each iteration? Or do you just calculate one volume per iteration?