Conditional Statements Between Two Arrays
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Nathaniel Wolff
am 11 Dez. 2019
Kommentiert: Nathaniel Wolff
am 19 Aug. 2020
I am trying to compare each value between two large arrays then store true values as another array. What do I type?
2 Kommentare
Akzeptierte Antwort
Ruger28
am 11 Dez. 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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!