How to deleted Enter char
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Xiaoning.Wang
am 27 Nov. 2020
Kommentiert: Xiaoning.Wang
am 30 Nov. 2020
a = '
'MOVABLE,ERASABLE,
MERGEABLE'
a(18) = '
' % there hava a Enter char
I want to delete the Enter Char.
the way ('\n' or 'r' or '\r\n' ) is error. so how to delete the Enter char
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 27 Nov. 2020
a = regexprep(a, '[\r\n]', '')
or
a(ismember(a, [10 13])) = ''; %10 is newline, 13 is carriage return
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!