how can I eliminate space between characters of a string?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
tina jain
am 11 Mai 2015
Beantwortet: Guillaume
am 11 Mai 2015
e.g. let my string is this t P t P t P t P t P t P t P t P t P t How to convert this string with no white spaces t P t P t P t P t P t P t P t P t P t --->tptptptptptptptptptpt
0 Kommentare
Akzeptierte Antwort
Guillaume
am 11 Mai 2015
s = 't P t P t P t P t P t P t P t P t P t';
%option 1, strrep:
s1 = strrep(s, ' ', '')
%option 2, comparison and deletion
s2 = s; s2(s2 == ' ') = []
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu File Operations 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!