You define
radialfunction = radius/(z^2+radius.^2).^(3/2);
but "z" has no obvious definition at that point.
Whatever definition it does has will be evaluated and "locked in" to the value of radialfunction.
Are you expecting z to be a sym ? If you are then please note that if you have
syms z
f = z
z = 5
f
then you will find that f is still "z" and does not get evaluated according to the current value of z. You need to subs() to get the current value of z to replace the symbol "z", as in
subs(radialfunction)
Note, though, that that would result in symbolic numbers (at least in theory; Azzi showed a counter-example the other day), so if you want the result to be numeric you should double() the result,
double(subs(radialfunction))
Please be careful in your definition of radialfunction about whether you want matrix division (the / operator) or you want element-by-element division (the ./ operator)