フィルターのクリア

Finding frequency of values above a certain value in a matrix

2 ビュー (過去 30 日間)
Ishani Mukherjee
Ishani Mukherjee 2020 年 10 月 12 日
コメント済み: Ameer Hamza 2020 年 10 月 12 日
I have a 301X301 matrix (M). How do I find number of cells above a certain value?
Thanks in advance.

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 10 月 12 日
編集済み: Ameer Hamza 2020 年 10 月 12 日
Use nnz(): https://www.mathworks.com/help/matlab/ref/nnz.html with the logical matrix
thresh; % threshold value
n = nnz(M > thresh) % number of element over 'thresh' value
  2 件のコメント
Ishani Mukherjee
Ishani Mukherjee 2020 年 10 月 12 日
It's working. Thanks again.
Ameer Hamza
Ameer Hamza 2020 年 10 月 12 日
I am glad to be of help!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by