Finding elements according to indices from an array
1 回表示 (過去 30 日間)
古いコメントを表示
Suppose,
x=[11 13 10 16 15 19 12 18 17 14]
y=[1 2 5 7 10]
I want to find the elements according to the indices presented in y.
The answer would be
[11 13 15 12 14]
0 件のコメント
採用された回答
Image Analyst
2022 年 1 月 17 日
x=[11 13 10 16 15 19 12 18 17 14];
y=[1 2 5 7 10];
theAnswer = x(y)
Try looking at this:
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT-Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!