I found the answer myself so I figured I might as well post the solution for anyone else.
sh=ezsurf(func,limit);
zd=get(sh,'zdata');
xd=get(sh,'xdata');
yd=get(sh,'ydata');
% Construct 3xa matrix of data points (X,Y,Zmax)
while a<=size(i,1)
A(1,a)=xd(i(a));
A(2,a)=yd(i(a));
A(3,a)=zmax;
a=a+1;
end
