MATLAB: Plotting 2 columns in a matrix within a range of values of a 3rd column

MATLABmatrix manipulationplottingsort

Hey all, so I have this 260×3 matrix where the first column is listed in ascending order (note that the increments are not equally spaced, and there are some repeating values). I want to plot the corresponding values in the other 2 columns if they are within a specific range of the first column, with the range increasing for sequential plots.
Ex:
z x y
1 2 2
1.2 2 3
1.2 5 1
2 4 1
3.5 3 5
4 4 2
4 2 3
4.3 5 3
5 2 4
So if I'm looking to plot(x,y) for column z values between 1 and 2, then a new plot for z values between 1.2 and 2.2, then so on and so forth, how do I go about doing this?
Cheers, and thanks.

Best Answer

You should proceed lie this:
A = [1 2 2
1.2 2 3
1.2 5 1
2 4 1
3.5 3 5
4 4 2
4 2 3
4.3 5 3
5 2 4];
x = A(:,2) ; y = A(:,3) ; z = A(:,1) ;
idx = z>=1 & z<=2 ;
plot(x(idx),y(idx),'*r')