Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How to Find Indices
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
How to find the first three indices corresponding to elements that are less than 10 and their indices start from 3? I try the function below but it doesn’t show the indices of elements correctly. The correct answer should be: B = [ 3 5 8 9 ]
A = [ 18 3 1 11 8 10 11 3 9 14 6 1 4 3 15 21 ];
B = find( A( 3 : end ) < 10, 4 )
B = [ 1 3 6 7 ]
0 comentarios
Respuestas (1)
Image Analyst
el 13 de Ag. de 2016
Try adding 2 and changing 4 to 3:
A = [ 18 3 1 11 8 10 11 3 9 14 6 1 4 3 15 21 ];
B = find( A( 3 : end ) < 10, 3, 'first') + 2
B =
3 5 8
0 comentarios
La pregunta está cerrada.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!