フィルターのクリア

Finding elements in an array that differ by a certain tolerance from elements in another array of different size

1 回表示 (過去 30 日間)
What is the best way to do the following:
count=0
for i=1:size(array_1,1)
for j=1:size(array_2,1)
if abs(array_1(i)-array_2(j))<1
count=count+1;
array_3(count)=array_2(j);
end
end
end
The arrays are of different size

採用された回答

KSSV
KSSV 2018 年 2 月 20 日
Read about ismembertol

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by