Counting the maximum occurrence of an element in 3d matrix ?
조회 수: 3 (최근 30일)
이전 댓글 표시
I have a matrix of dimensions (61x61x122) or (lat,lon,days), which has 0 and 1 values for random days.
I want to calculate the value of maximum occurrence of 1 for each grid (lat,lon).
댓글 수: 0
채택된 답변
madhan ravi
2019년 8월 30일
sum(3dmatrix==1,[1,2])
% for older versions
sum(sum(3dmatrix==1,2),1)
댓글 수: 4
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!