(Select all that apply) In which of the following situations would you typically use a categorical array?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sangat Naik
am 15 Okt. 2021
Kommentiert: Mpho
am 27 Nov. 2023
Please answer the below question shown in image.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/768571/image.png)
Akzeptierte Antwort
Lei Hou
am 17 Okt. 2021
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 Kommentare
Lei Hou
am 19 Okt. 2021
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
Weitere Antworten (2)
Arliya Marin Mathew
am 21 Okt. 2021
●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
Siehe auch
Kategorien
Mehr zu Categorical Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!