how can I filter the nth character from categorical?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Aletta Wilbrink
am 19 Mär. 2018
Beantwortet: Peter Perkins
am 23 Mär. 2018
i have a categorical value a, looks like:
a = 888-2018-02160001
Now I want the 10th and 11th character, the '02'.
I already tried a(10:11), but that doesn't work, because the length of a is 1. Also when I try string(a), the length is still 1
How can I filter these characters from a categorical?
0 Kommentare
Akzeptierte Antwort
Birdman
am 19 Mär. 2018
>>a = '888-2018-02160001'
a(10:11)
ans =
'02'
Weitere Antworten (1)
Peter Perkins
am 23 Mär. 2018
If you have a categorical variable, as in the categorical data type, then it sounds like you want to work with the category names. Converting the entire (large) categorical array will be very inefficient in terms of memory. probably the easiest thing to do is to make a copy, modify the copy's category names using renamecats, and you're done.
Not enough information to go to know if that's what you want.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Matched Filter and Ambiguity Function finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!