Conditional Statements Between Two Arrays
조회 수: 2 (최근 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에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!