MATLAB: How to filter rows with respect to specific entry

cell arraysfiltermatricesmatrix array

I have thousands of rows and I want to filter those rows in which the entry at third position is three
For example
A=[1 2 3 4 5 6 7 8 9;0 1 2 3 4 5 6 7 8 9 10;5 6 3 2 1 4 7 8 9];
I want the resulting matrix
AA=[1 2 3 4 5 6 7 8 9;5 6 3 2 1 4 7 8 9]
Thanks

Best Answer

>> A=[1 2 3 4 5;0 1 2 3 4;5 6 3 2 1];
>> A(A(:,3)==3,:)
ans =
1 2 3 4 5
5 6 3 2 1
>>