Split String into Alphabets
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi All,
I want split each alphabet from input string like
input_text='helloworld'
Then i want to split each alphabet till the end of string like
'h' 'e' 'l' like wise
Pls provide me some direction..
Thanks in Advance !!!
1 Kommentar
Jan
am 2 Nov. 2011
This is a confusing question. Actually the characters are separated already: 'hello' and ['h', 'e', 'l', 'l', 'o'] are exactly the same.
Akzeptierte Antwort
Amith Kamath
am 2 Nov. 2011
you could access each element of the string by looking at input_text(i) where i varies from 1 to size(input_text,2).
for example, input_text(1:3) will give you 'hel';
For more sophisticated tasks, you may want to look into cell variables for they give a lot more flexibility.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!