필터 지우기
필터 지우기

Creating a position Vector

조회 수: 14 (최근 30일)
Jasraj Soni
Jasraj Soni 2019년 9월 8일
댓글: Jasraj Soni 2019년 9월 8일
A = [1; 3; 5; 7; 9; 11; 13; 15] //Parent Vector (column vector)
B =[3; 7; 11] //Vector obtained from A based on some constraints
C = [2; 4; 6] // It is a position vector showing the position of values of B in A.
So my question is, how to find the position vector (i.e. C) ?

채택된 답변

madhan ravi
madhan ravi 2019년 9월 8일
편집: madhan ravi 2019년 9월 8일
C = find(ismember(A,B))
  댓글 수: 1
Jasraj Soni
Jasraj Soni 2019년 9월 8일
Its working!
Thanks a lot.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by