display newline string from cell array

6 次查看(过去 30 天)
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

采纳的回答

Geoff Hayes
Geoff Hayes 2018-3-16
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 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by