필터 지우기
필터 지우기

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by