フィルターのクリア

To know what number is not available in an array.

1 回表示 (過去 30 日間)
fyza affandi
fyza affandi 2019 年 2 月 28 日
編集済み: Stephan 2019 年 2 月 28 日
I have an array A
A=[ 1 7 3 8 7 2 6];
Then after sorting the array A,
B=sort(A,ascending);
B=[1 2 3 6 7 8];
How can I know which number it doesnt contained? Which is 4 and 5?

採用された回答

Stephan
Stephan 2019 年 2 月 28 日
編集済み: Stephan 2019 年 2 月 28 日
A=[ 1 7 3 8 7 2 6]
Missing = find(~ismember(min(A):max(A),A))

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by