function z=gridab(A,b,xi1,xi2) [m n]=size(xi1); for i=1:m for j=1:n z(i,j)=qab(A,b,[xi1(i,j);xi2(i,j)]); end end end