How to get a matrix row number if values are found [Matlab]

Spread the word!

Suppose we have this matrix

and we need to search for the values

to get the corresponding row numbers of the matrix in case at least one of the values is found in that row. The result should look like the following:

Let’s see the code snippet performing this task using the above defined vectors:

 

Be the first to comment

Leave a Reply

Your email address will not be published.


*