How to create categorical array from integer array?
Show older comments
I would appreciate some help on the following:
I would like to create a categorical array from an integer array. When I use the sample code from the documentation center:
A = gallery('integerdata',3,[2,3],3);
valueset = 1:3;
catnames = {'car' 'bus' 'bike'};
B = categorical(A,valueset,catnames);
I get the following error message: Error using categorical Abstract classes cannot be instantiated. Class 'categorical' defines abstract methods and/or properties.
What does this error message mean? and how can it be resolved? Thanks!
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!