"categorical()" cannot convert continuous data into categorical data with an error: "Unable to create default category names. Specify category names using the CATEGORYNAMES input argument."
Show older comments
I tried to convert numbers in double array into categorical data using "categorical()" function.
However, such an error occurs as below. What is the reason for this?
"Unable to create default category names. Specify category names using the CATEGORYNAMES input argument."
To reproduce the issue, run the code below.
a= [0.157132, 0.157132, 0.157135, 0.157135, 0.19604, 0.19604];
categorical(a)
Accepted Answer
More Answers (0)
Categories
Find more on Categorical Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!