how to find the index of a vector.

4 Ansichten (letzte 30 Tage)
friet
friet am 13 Feb. 2018
Bearbeitet: Matt J am 13 Feb. 2018
i have a vextor x with 1000 rows. I would like to find the index of x where the values of xsrt are located.
xsrt=[ -84.5 -41.6 4.1 44.6 64.5 104.4 144.95 196.83 258.80 325.70];
ixsrt= find(x==xsrt)
how can i find out the location of xsrt in the variable x. i.e I want to find the index -84.5 and so on...
Thanks

Antworten (1)

Matt J
Matt J am 13 Feb. 2018
Bearbeitet: Matt J am 13 Feb. 2018
[LIA,LocB] = ismembertol(x,xsrt,tol)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by