Find Command after certain Value
Mostrar comentarios más antiguos
Dear Community Members,
I am looking for a function to return the rowindex of the following problem: Assuming a matrix A, I need the index of the first "2" in A that follows a "3". Hence, the required index in the following example is "8". The length of A might differ between different cases.
A = [1, 1, 2, 2, 3, 3, 4, 2, 2, 5, 6, 2, 2]'
Unfortunately, I do not know how to solve this problem in Matlab.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Operators and Elementary Operations en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!