How can I replace string categories into numbers (such as 'AAA' would become 1, 'AA+' would become 2)?
Mostrar comentarios más antiguos
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 comentarios
Azzi Abdelmalek
el 27 de En. de 2016
Can you post an example?
Peter Perkins
el 28 de En. de 2016
Editada: Peter Perkins
el 28 de En. de 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
el 3 de Feb. de 2016
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!