How can I replace string categories into numbers (such as 'AAA' would become 1, 'AA+' would become 2)?
Ältere Kommentare anzeigen
I found how to create a categorical array from integers but I'm trying to do the opposite as I want to calculate with the ratings.
3 Kommentare
Azzi Abdelmalek
am 27 Jan. 2016
Can you post an example?
Peter Perkins
am 28 Jan. 2016
Bearbeitet: Peter Perkins
am 28 Jan. 2016
Although Sean has answered your specific question, needing to convert a categorical to numbers is sometimes an indication that maybe you are trying to do something that could be done another way, or something that categorical isn't really intended for. Can you provide more context?
Jelle Zwart
am 3 Feb. 2016
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!