フィルターのクリア

deleting values from an array

2 ビュー (過去 30 日間)
SSG_newbiecoder
SSG_newbiecoder 2018 年 1 月 4 日
編集済み: Stephen23 2018 年 1 月 4 日
I have an array R3. I need to eliminate those elements of R3 which are present in another, smaller array. Is there an easy method to do this?
  1 件のコメント
Stephen23
Stephen23 2018 年 1 月 4 日
編集済み: Stephen23 2018 年 1 月 4 日
"Is there an easy method to do this?"

サインインしてコメントする。

採用された回答

Jan
Jan 2018 年 1 月 4 日
編集済み: Jan 2018 年 1 月 4 日
setdiff replies all elements of a vector, which do not appear in a second one:
R3 = setdiff(R3, smallerArray);
Or
R3 = R3(~ismember(R3, smallerArray))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by