Display the most occuring categorical element in the column

2 次查看(过去 30 天)
For a dataset's column of categorical values, how to display the most occuring element in the column?
  2 个评论
Sachin Motwani
Sachin Motwani 2020-9-22
Like I had the data of number of animals in a huge pet shop. possible, there could be more than one bvariety of dogs, those are still all dogs and so a column naems 'animal name' might contain several animals names repeatedly - say 7 types of dogs and 5 types of cat.
Now, I wish to find which animal I have the maximum variety of. Then I shall use this column to find out the same.

请先登录,再进行评论。

采纳的回答

Sachin Motwani
Sachin Motwani 2020-9-22
Got my answer.
It's the 'mode' function simply.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by