MATLAB: Extract x and y coordinates for points in a multivariable function

functionsmultivariablexygridxyz

I have a function of two variables(x and y). This function only has values of 0 and 1 for each point on the x-y grid. How would I extract the x,y location on the grid for the values which are 1? Thanks

Best Answer

Given a z
[i,j]=find(z); % indices for lookup into x,y