matlab space error problem
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
does anyone know why my output doen't have space between two words
11 Kommentare
Brent Kostich
am 28 Mai 2020
Did you not write this function? If you are asking me if your own test case is right, then I take it you have no idea what that code is doing.
If that is true, then no one can help you.
Antworten (2)
Fangjun Jiang
am 28 Mai 2020
From "help strcat"
For character array inputs, strcat removes trailing ASCII white-space
characters: space, tab, vertical tab, newline, carriage return, and
form-feed. To preserve trailing spaces when concatenating character
arrays, use horizontal array concatenation, [s1, s2, ..., sN]
0 Kommentare
Steven Lord
am 28 Mai 2020
You can use concatenation as Fangjun Jiang and Brent Kostich suggested. I'd probably use join instead.
join(["I", "love", "Georgia", "Tech"])
0 Kommentare
Siehe auch
Kategorien
Mehr zu NaNs 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!