Retrive index of an element from vector.
2 ビュー (過去 30 日間)
古いコメントを表示
Hello all, I am having two vectors of same dimension as shown:
sr = [1,2,2,2,2,3,3,3,3,4,4,5,6,6,6,7]; % various possible Source
ta = [2,1,3,6,8,2,4,6,7,3,6,6,3,4,5,3]; % various possible targets
We access the elements in 'sr' by 'i' and 'ta' by 'j'. My query is how can we get the index of elements in these vector, for e.g., when i = 2 and j = 3.
Any help in this regard will be highly appreciated.
1 件のコメント
Mathieu NOE
2023 年 5 月 15 日
if I understand correctly, i and j are the indexes of your vectors but we need a logic / rule to define i and j
your question is unclear or incomplete, what do you want to achieve ?
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!