Finding corresponding values between vectors
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Kirby Runyon
le 10 Juin 2015
Réponse apportée : Rong Yu
le 11 Juin 2015
umps_land is a vector and a subset of vector umps. The subset was selected graphically using the brush. vmps is a vector the same size as umps. I want to (non-graphically) find the values of vmps that correspond to umps_land and call it vmps_land. How do I accomplish this seemingly easy operation? (and why can't I find documentation on this??)
4 commentaires
Guillaume
le 11 Juin 2015
@Rong Yu, in the future post your answer as an answer rather than a comment to the question. That way the OP can accept your answer and you get reputation.
Réponse acceptée
Rong Yu
le 11 Juin 2015
Try ismember
index = ismember(umps,umps_land);
vmps_land = vmps(index);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrix Indexing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!