フィルターのクリア

check 2 same numbers in a matrix

2 ビュー (過去 30 日間)
Pas182
Pas182 2022 年 6 月 14 日
コメント済み: Pas182 2022 年 6 月 14 日
Hello everyone! :)
in a matrix like:
NaDFIR_from_tool = [ 80 39 101 39 101 175 237 172 232 168 232 168 104 40 ]
how can i check that a number (in this case 39 and 168) is present 2 times?
Thank you so much!
  1 件のコメント
Pas182
Pas182 2022 年 6 月 14 日
Awesome! thank you so much!

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

採用された回答

Dyuman Joshi
Dyuman Joshi 2022 年 6 月 14 日
y= [80 39 101 39 101 175 237 172 232 168 232 168 104 40]
y = 1×14
80 39 101 39 101 175 237 172 232 168 232 168 104 40
nnz(y==39)==2
ans = logical
1
nnz(y==168)==2
ans = logical
1

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by