Convert categorical to string
374 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have two categorical column vectors of size 872-by-1. I want to calculate the Levenshtein distance between these two. When I am using the command 'editDistance' for this I am getting an error as
"Argument 1 must be a string array, a character vector, or a cell array of character vectors."
After searching the solution for this problem, I thought to convert it to string, but I am not getting a way for this. How can I convert categorical column vector to string? or how can I resolve the error?
In case of any query feel free to comment.
2 Kommentare
Stephen23
am 2 Okt. 2021
V1 = categorical([1,2,3,2,2,1])
V2 = categorical([3,1,2,2,1,1])
S1 = string(V1)
S2 = string(V2)
Antworten (0)
Siehe auch
Kategorien
Mehr zu Categorical Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!