To find values by using position vector
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Xia
el 18 de Mzo. de 2015
Comentada: Xia
el 18 de Mzo. de 2015
Suppose matrix A=[1 3 5 7 9]. The position vector is known, which is, say, B=[ 3 4 ]. So the intended answer should be [ 5 7 ] which are elements at the 3rd and 4th places. Is there a function to achieve this? In fact the matrix A is high dimensional and there are many position vectors, and for loops seem not the most effective way...
Thanks in advance.
0 comentarios
Respuesta aceptada
Más respuestas (1)
Ver también
Categorías
Más información sobre Matrix Indexing 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!