How to select the first letter of every word
1 view (last 30 days)
Show older comments
Krish Desai
on 5 Dec 2015
Commented: Krish Desai
on 10 Dec 2015
I have no idea how I would go about doing this
Input: I like eating pizza Output: Ilep
0 Comments
Accepted Answer
Mohammad Abouali
on 5 Dec 2015
Edited: Mohammad Abouali
on 5 Dec 2015
str='I like eating pizza';
str2=cellfun(@(c) c(1),strsplit(str))
6 Comments
More Answers (0)
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!