How can I replace string categories into numbers (such as 'AAA' would become 1, 'AA+' would become 2)?
Afficher commentaires plus anciens
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 commentaires
Azzi Abdelmalek
le 27 Jan 2016
Can you post an example?
Peter Perkins
le 28 Jan 2016
Modifié(e) : Peter Perkins
le 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
le 3 Fév 2016
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Characters and Strings dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!