필터 지우기
필터 지우기

display newline string from cell array

조회 수: 6 (최근 30일)
Elysi Cochin
Elysi Cochin 2018년 3월 16일
답변: Geoff Hayes 2018년 3월 16일
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