i have an array lets say
x =
1 2 2
5 8 7
now i want to get the corresponding values of a number in 2nd row. like i have number =2
and i want
ans= 8 and 7
as 8 and 7 are the corresponding points for 2.
i have an array lets say
x =
1 2 2
5 8 7
now i want to get the corresponding values of a number in 2nd row. like i have number =2
and i want
ans= 8 and 7
as 8 and 7 are the corresponding points for 2.
X(2,X(1,:)==2)
should do. Hope you can figure out how.