Filter löschen
Filter löschen

Creating a position Vector

14 Ansichten (letzte 30 Tage)
Jasraj Soni
Jasraj Soni am 8 Sep. 2019
Kommentiert: Jasraj Soni am 8 Sep. 2019
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) ?

Akzeptierte Antwort

madhan ravi
madhan ravi am 8 Sep. 2019
Bearbeitet: madhan ravi am 8 Sep. 2019
C = find(ismember(A,B))

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by