Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit:

find out in which row an element is equal to a specific number

Asked by Locks on 1 May 2013


I have the following problem:

I have a matrix with 20 columns and over 200'000 rows. somewhere in this matrix there seems to be some strange datas which I would like to delete. If I am looking for the rownumbers where the value is higher than a specific value, lets say I am looking for all the values in the first row that are larger than 1500

If I do this:


I get a logical array, but what I am looking for is the exact row number, what do I need to do?




No products are associated with this question.

2 Answers

Answer by James Tursa on 1 May 2013
Edited by James Tursa on 1 May 2013
Accepted answer

If you are looking for rows where any value is > 1500, then


Or if you are only interested in rows where the 1st column is > 1500, then


1 Comment

Locks on 1 May 2013


James Tursa
Answer by Youssef KHMOU on 1 May 2013
Edited by Youssef KHMOU on 1 May 2013

hi try :


1 Comment

Locks on 1 May 2013


Youssef  KHMOU

Contact us