find the cordinate in the array using index

2 visualizaciones (últimos 30 días)
singh
singh el 17 de Abr. de 2015
Comentada: Star Strider el 17 de Abr. de 2015
suppose i have three array
A =
X Y
10.22 21.32
21.54 28.31
94.43 64.11
55.33 82.43
66.11 32.43
82.43 21.54
55.33 82.00
93.22 12.32
in each XY coordinate contain one value which will be store in array B
one value with respect to that XY coordinates contains
B=
29
43
69
1
88
66
21
array contain index value of each XY coordinates
C=
1
2
3
4
5
6
7
now i wish to get XY coordinate of any one value of B through index value
let i have one value from array B is 88
ch=88
and now how i get the index value of the that ch value
and how to get the XY coordinate from A through index value.

Respuesta aceptada

Star Strider
Star Strider el 17 de Abr. de 2015
Editada: Star Strider el 17 de Abr. de 2015
Assuming that you want to use ‘B’ and ‘C’, this works:
Result = A(C(B == 88),:)
produces:
Result =
66.11 32.43
  2 comentarios
singh
singh el 17 de Abr. de 2015
thanks star
Star Strider
Star Strider el 17 de Abr. de 2015
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by