How to concatenate strings

Return answer = 'MIF' on passing the function
FirstLetterOfWords('Matlab Is Fun') = 'MIF'

 Accepted Answer

str = 'Matlab Is Fun' ;
iwant = cellfun(@(v)v(1),strsplit(str))
iwant = 'MIF'

More Answers (0)

Categories

Products

Release

R2021a

Tags

Asked:

on 21 Jul 2021

Answered:

on 21 Jul 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!