Find count of repeated letters
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jothi
am 30 Sep. 2013
Kommentiert: Jothi
am 7 Okt. 2013
Sir,
How to find the no. of repeated sequence (letters) in the given sentence.
for example, a="I want THAAAAAT APPPPPLE ):):):";
The No. of repeated sequences are: 3
ie.,
1. THAAAAAT
2. APPPPPLE
3. ):):):
thanks
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 30 Sep. 2013
a='I want THAAAAAT APPPPPLE ):):):'
s=regexp(a,'\s+','split')
out=s(~cellfun(@(x) numel(unique(x))==numel(x),s))
3 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings 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!