Borrar filtros
Borrar filtros

Finding when data in a matrix exceeds a certain value

5 visualizaciones (últimos 30 días)
Yong Chen Chin
Yong Chen Chin el 4 de Mzo. de 2015
Editada: Guillaume el 4 de Mzo. de 2015
Hi,
I am trying to find the onset of damage within a data 'X' which is a 4373x1 matrix . I have subtracted away the standard deviation of the data and am now trying to find where the data is larger than the standard deviation, i.e. greater than 0.
Is there a function in MATLAB that will tell me when the data exceeds 0 and will print the row number?
Thanks

Respuestas (2)

David Young
David Young el 4 de Mzo. de 2015
find(X > 0, 1)

Guillaume
Guillaume el 4 de Mzo. de 2015
Editada: Guillaume el 4 de Mzo. de 2015
Use find:
[row, column] = find(m > 0)
or if you just want the row:
[row, ~] = find(m > 0) %you still need to ask for both, otherwise you get linear indices

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by