Hi all,
thanks a lot for all your answers!!!
This is a really weired one I'm pulling the text from websites. I tried native2unicode() and renaming it (e.g. myNewArray). Nothing worked.
I finally worked around it by using the function "isletter" and using a for loop since isletter doesn't take a string array:
for iLine=1:length(myStringArray)
currentChangeLine=char(myStringArray(iLine));
idxUnderscore=strfind(currentChangeLine,'_');
idxWhiteSpace=find(isspace(currentChangeLine));
idxIsDigit=find(isstrprop(currentChangeLine,'digit'));
idxNotALetter=find(~isletter(currentChangeLine));
idxChange=setdiff(idxNotALetter,[idxUnderscore,idxWhiteSpace,idxIsDigit]);
currentChangeLine(idxChange)='_';
myStringArray(iLine)=currentChangeLine;
end
It's not a neat solution but it worked!
Once again thanks a lot for all your help!
Best Answer