Converting a vector of stings into a numerical vector
Show older comments
Hi, I have a vectro of Strings like v =['def', 'def', 'def', 'atq', 'atq', 'dex', 'dex',....] How can I get a numerical vector like v_num =[1, 1, 1, 2, 2, 3, 3, ...] So I want all "classlables" to be converted into a numerical "classlable". E.g all 'def's become 1 and all 'atq' become 2 and so on Thanks Tris
Accepted Answer
More Answers (0)
Categories
Find more on Text Analytics Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!