Conditional Statements Between Two Arrays
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Nathaniel Wolff
il 11 Dic 2019
Commentato: Nathaniel Wolff
il 19 Ago 2020
I am trying to compare each value between two large arrays then store true values as another array. What do I type?
2 Commenti
Risposta accettata
Ruger28
il 11 Dic 2019
a = 1:100;
b = 1:2:100;
c = ismember(a,b); % index of values of array a inside of array b
d = a(c); % the values inside of a that are in b
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Matrices and Arrays in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!