How to add string to the beginning of each element in a string array?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ana Alonso
am 12 Dez. 2018
Kommentiert: Ana Alonso
am 12 Dez. 2018
Hi there,
I'm trying to append a string to the beginning of each element in a string array. Specifically, I'd like to add the text "Syl_" such that I can turn the string array s1 into the string array s2.
s1 = string(1:4)
1×4 string array
"1" "2" "3" "4"
s2 = ["Syl_1", "Syl_2", "Syl_3", "Syl_4"]
1×4 string array
"Syl_1" "Syl_2" "Syl_3" "Syl_4"
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Graph and Network Algorithms finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!