I'm looking to index a value in a certain row of a matrix, based on the values in one of the columns. For example, if I have an array like this:
[45 1 234 45758 1 283 38449 2 384 22192 2 983 17497 1 937 123]
How can I index the values in column 3 for values where the value in column 2 of the same row is 1? Without specifying the exact position of the value like column 3, row 1 and such. Is there a way to use logical indexing to do this?
Best Answer