Using strjoin on each row of NxM cell array
Ältere Kommentare anzeigen
I have NxM cell arrays of text and I need to use strjoin across each row, with an underscore as the delimiter. I think I need cellfun or rowfun, but I can't figure out the syntax.
C = [{'ABC'} {'123'} {'blue'};
{'DEF'} {'456'} {'red'};
{'GHI'} {'789'} {'green'}]
C_join = rowfun(@strjoin,C,'_');
The goal is a Nx1 cell array of joined text...
C_join = [{'ABC_123_blue'};
{'DEF_456_red'};
{'GHI_789_green'}]
Thanks for you help!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!