Conditional Statements Between Two Arrays
1 次查看(过去 30 天)
显示 更早的评论
I am trying to compare each value between two large arrays then store true values as another array. What do I type?
采纳的回答
Ruger28
2019-12-11
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
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!