How to find a replace _ in a header of a large table
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Emanuele Mele
am 8 Mär. 2019
Beantwortet: Walter Roberson
am 9 Mär. 2019
Hi all
I would like to know if and how you can automatically replace with a funciton the character _ in the header of a table 400 x 115 where this is present in random order.
Thank you!
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 9 Mär. 2019
YourTable.Properties.VariableNames = regexprep(YourTable.Properties.VariableNames, '_', 'XXX');
Change the 'XXX' to the thing you want the '_' replaced with. The replacement characters must be chosen from '' (empty) or 'A':'Z' or 'a':'z' or '0':'9' or '_' -- in other words the VariableNames are restricted to being valid MATLAB variable names.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!