I get a string that contains a sentence in two lines:
'hello this is my first. program matlab'
and I want to change the sentence to be presented on the line:
'hello this is my first.program matlab'
How can I do this using matlab?
Replace all occurrences \n with ''
\n
''
myNewSt = strrep(mySt,sprintf('\n'),'');
For example, enter:
strrep( sprintf('this is my \n string'),sprintf('\n'),'')