필터 지우기
필터 지우기

Counting the maximum occurrence of an element in 3d matrix ?

조회 수: 3 (최근 30일)
Jitesh Dadich
Jitesh Dadich 2019년 8월 30일
댓글: madhan ravi 2019년 9월 5일
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).

채택된 답변

madhan ravi
madhan ravi 2019년 8월 30일
sum(3dmatrix==1,[1,2])
% for older versions
sum(sum(3dmatrix==1,2),1)
  댓글 수: 4
madhan ravi
madhan ravi 2019년 9월 5일
Thank you, Andrei.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by