Organize vector, extract indices
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello, everything okay?
How can I efficiently do the following are between one by one in vector A?
A=[2 4]
B=[2 70 8 29 98 100]
I need to put in Out the indexes of vector B that are different from the indexes of A.
Out=find(B~=B([A]))
This is the output I need.
Out =[1 3 5 6].
0 commentaires
Réponse acceptée
Stephen23
le 27 Nov 2020
A = [2,4];
B = [2,70,8,29,98,100];
Out = setdiff(1:numel(B),A)
3 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays 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!