How can I split a word to parts?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Giorgi
am 20 Jan. 2015
Kommentiert: Giorgi
am 20 Jan. 2015
Hi all, Well I want to split a word into parts for example I have sentence a='Hello World', and I want to b='llo', How can I do such thing?
4 Kommentare
Stephen23
am 20 Jan. 2015
Bearbeitet: Stephen23
am 20 Jan. 2015
Where do you want to split the words: at space characters, after the first n characters, the n final characters, after any doubled characters, two digits before any vowel character, or one of a million other rules that could explain your example output string?
Your description is inadequate.
Akzeptierte Antwort
Ilham Hardy
am 20 Jan. 2015
thres = 3; %three last character of first word
a = 'Hello World';
b = strtok(a);
b = b(end-(thres-1):end);
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Cell 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!