How to create a vector with the same string elements?
Ältere Kommentare anzeigen
Hello,
I am trying to create a vector with all the same string elements. When it is numeric, it is as easy as ones(10,1)*5, which gives a vector of "fives". How do you do the same thing with a string, say if I want a vector with all the elements of string 'hi'? Thank you!
Akzeptierte Antwort
Weitere Antworten (1)
Luiz Guilherme Pancini
am 27 Jan. 2022
0 Stimmen
"hi" + strings(10,1)
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!