Reputation: 325
I have a string array in MATLAB '''''''xxxxx''''''', and I want only xxxxx. How can I achieve this?
Upvotes: 0
Views: 3887
Reputation: 21563
You really need a lot of quotes to represent just one! Here is the code to remove all quotes:
x(x=='''')=[]
Upvotes: 0
Reputation: 238597
This should do the trick:
s='''''''xxxxx''''''';
newS = strrep(s, '''', '');
newS =
xxxxx
Upvotes: 2