(Select all that apply) In which of the following situations would you typically use a categorical array?
16 次查看(过去 30 天)
显示 更早的评论
Please answer the below question shown in image.
采纳的回答
Lei Hou
2021-10-17
Hi Sangat,
Typically, categorical is useful when your array is large, contains duplicated values and has finite set of discrete categories. For example, a very long vector of US states. A categorical array provides efficient storage and convenient manipulation of nonnumeric data. Regarding the situations you provided, I would recommend:
- A list of text where some values in the list are repeated
- A column in a table that labels which group each row belongs to
Thanks,
Lei
3 个评论
Lei Hou
2021-10-19
Hi Sangat,
We can exclude "A distribution of numeric data" and "A list of all unique values". The description of "a fixed set of possibilities" is not very clear of what the data look like. If the data contains duplicated values and possible values are from a fixed set, then it is also a use case of categorical.
Thanks,
Lei
更多回答(2 个)
Arliya Marin Mathew
2021-10-21
●A list of text where some values in the list are repeated ●A fixed set of possibilities ●A column in a table that labels which group each row belongs to
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Categorical Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!