how to find the index of a vector.

조회 수: 5 (최근 30일)
friet
friet 2018년 2월 13일
편집: Matt J 2018년 2월 13일
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

답변 (1개)

Matt J
Matt J 2018년 2월 13일
편집: Matt J 2018년 2월 13일
[LIA,LocB] = ismembertol(x,xsrt,tol)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by