how to display a word in a format
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i have a word... i want to delete the last three alphabets of the word... what shud i do... also if the word has any underscore or full stop it should also be deleted.... please do reply...
if the word is "matlab_ans.wer" it should display "matlab ans" if the word is "matlab_ask_a_question" it should display
"matlab ask a quest"
that is delete "wer" and "ion" and insert a space in place of underscore and just delete the full stop if any...
3 Kommentare
Akzeptierte Antwort
Jonathan Epperl
am 4 Dez. 2012
Strings are pretty much like vectors, simply get rid of the last 3 entries:
s = s(1:end-3);
As for the rest, have a look at strrep and/or regexprep.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Time Series Collections 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!