remove the functionality of special characters
Show older comments
I have a cell array that contains the '%' character
C = {000000020F0D0%, 0000000281830%, 0071803F01CF0%, 0071803F6AA40%};
the problem is that it commnets out everything after it. How do I avoid this?
Accepted Answer
More Answers (1)
Jonah Pearl
on 30 Dec 2019
What are the % signs for? I think you can just make the contents of the cell array into characters:
C = {'000000020F0D0%', '0000000281830%', '0071803F01CF0%', '0071803F6AA40%'};
If you ever need to get just the part out before the % sign, you can use regexp:
part = regexp('000000020F0D0%', '(\w*)%', 'tokens');
1 Comment
avram alter
on 30 Dec 2019
Edited: avram alter
on 30 Dec 2019
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!