[X, Y, Z] = meshgrid(x, y, z);
f = X.*exp(X.^2 + Y.^2 + Z.^2);
You can go to Tools>Data Tips on the figure's menu as such:
Then select the datapoint that you are interested in. Then you can type this in your command window:
Or if you can retrieve the coordinates of the datatip and use the following commands:
dt = findobj(gca,'Type','datatip')
If you need to do this frequently, you could make an app with a callback function that automaticaly displays the f value of the given datatip.