display newline string from cell array
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Elysi Cochin
am 16 Mär. 2018
Beantwortet: Geoff Hayes
am 16 Mär. 2018

I have a cell array of characters. In that i have a newline character.
I use strjoin to get the full sentence
fullsentence = strjoin(word, '');
But when i display output is coming as
ER\n\nR
but i wanted it as
ER
R
0 Kommentare
Akzeptierte Antwort
Geoff Hayes
am 16 Mär. 2018
Elysi - how are you displaying the output of fullsentence? If you do
fprintf(fullsentence)
then you should see the \n evaluated as line breaks.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings 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!