UPDATE:
I have reviewed the input arguments definitions (<http://www.mathworks.com/help/matlab/ref/inpolygon.html#zmw57dd0e373179>) and I have realized that I am totally off. So I made another attempt.
>ac = inpolygon(aa,ab,aa,ab);
I tried defining it this way because my query points are the same as my polygon points. I got a 1x4 vector of ones (yay, locicals).
So now do I just define a matrix with the xlim,ylim points and then just find the mean of it?