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).

采纳的回答

madhan ravi
madhan ravi 2019-8-30
sum(3dmatrix==1,[1,2])
% for older versions
sum(sum(3dmatrix==1,2),1)
  4 个评论

请先登录,再进行评论。

更多回答(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