Compute the complement of a set of indices in a known range
81 ビュー (過去 30 日間)
表示 古いコメント
I want to compute the complement of a set C. The elements are indices in the range 1 to K. Is the best/fastest/simplest way to go around this is using
C = setdiff(A,B)
or since I know they are not arbitrary sets of numbers, is there a better way to go around in MATLAB?
2 件のコメント
回答 (1 件)
Dave Behera
2016 年 4 月 6 日
Your approach with setdiff seems to be the best way because it is the simplest. I recommend you to use it.
0 件のコメント
参考
カテゴリ
Find more on Logical in Help Center and File Exchange
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!