xInRange = (x>=-25) & (x<=25);
yInRange = (y>=-25) & (y<=25);
xyInRange = xInRange & yInRange;
A = A(xyInRange,:);
You could roll the conditions into one statement, but I left them like this so you could see more clearly what I am doing.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!