Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要素の配列があり、別の行列内のそれらのインデックスを確認したい
たとえば、
A = [1 2 3] B = [1 2 3 4 5 3 4 5 1 2 3]
次に結果配列
C = [1 2 3 6 9 10 11]
1 2 3 のインデックスを与える
機能や処理の簡単な方法はありますか?
私はあなたが欲しいと思います:
find(ismember(B, A)) ans = 1 2 3 6 9 10 11