How to concatenate strings

1 Ansicht (letzte 30 Tage)
Sameer Pujari
Sameer Pujari am 21 Jul. 2021
Beantwortet: KSSV am 21 Jul. 2021
Return answer = 'MIF' on passing the function
FirstLetterOfWords('Matlab Is Fun') = 'MIF'

Akzeptierte Antwort

KSSV
KSSV am 21 Jul. 2021
str = 'Matlab Is Fun' ;
iwant = cellfun(@(v)v(1),strsplit(str))
iwant = 'MIF'

Weitere Antworten (0)

Kategorien

Mehr zu Numeric Types finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by