MATLAB: How to call out rows that contains a value X in column Z of matrix A

call outcolumnfunctionmatrixreturnrow

If I have a matrix A what command would return the number of each row in A that contains the value X in column Z?
EXAMPLE:
A:
20.0000 1.0000 8.3333
2.0000 2.0000 32.6667
45.0000 1.0000 5.3333
4.0000 1.0000 8.3333
54.0000 3.0000 25.0000
38.0000 3.0000 33.3333
7.0000 2.0000 16.6667
8.0000 1.0000 10.3333
somefunction(3,A(:,2)) = [5,6]
5 and 6 being the rows in A that contain the value 3 in column 2
Thank you!

Best Answer

find(A(:,Z)==X)
in general, and
find(A(:,2)==3)
for the specific case you mention.