How to concatenate strings

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

 采纳的回答

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

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Numeric Types 的更多信息

产品

版本

R2021a

标签

Community Treasure Hunt

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

Start Hunting!

Translated by