MATLAB: Index of a matrix

indexindex of a matrixmatrixsearch

I have two column matricies x and y (neither of them have repeating numbers). I want to search for a number in matrix x, get the index and get the number of that index in matrix y. This seems simple enough to do, but I am still not that familiar with matlab. Can someone help me out please?

Best Answer

index = (x==A); % A is the number you want to find in x.
y(index)
You would probably benefit from spending some time here: http://www.mathworks.com/help/techdoc/learn_matlab/bqr_2pl.html