how can I locate a number in a vector with out using the function find?
Mostrar comentarios más antiguos
I am trying to locate a number in vector with out using the function 'find'.is there a way i could do this?
2 comentarios
Stephanie Velasco
el 11 de Feb. de 2017
Editada: Stephanie Velasco
el 11 de Feb. de 2017
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 9 de Feb. de 2017
Editada: Image Analyst
el 9 de Feb. de 2017
1 voto
You can use ismember(), ismembertol(), intersect(), or strfind(), or even an "if" inside a for loop.
2 comentarios
Jan
el 9 de Feb. de 2017
@IA: The source code of ismember, ismembertol and inetrsect could contain a call to the find() function. The question sounds as a homework problem, so I'd prefer the for loop and an if, although this is a really bad solution from the viewpoint of software engineering.
Stephanie Velasco
el 11 de Feb. de 2017
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!