채택된 답변

Birdman
Birdman 2020년 3월 30일

2 개 추천

newline
For instance:
chr = 'Whose woods these are I think I know.';
chr = [chr newline 'His house is in the village though']
chr =
['Whose woods these are I think I know...'
'His house is in the village though']

댓글 수: 2

John D'Errico
John D'Errico 2020년 3월 30일
편집: John D'Errico 2020년 3월 30일
To add...
>> newline
ans =
'
'
Note the vertically displaced quotes as displayed in the command window.
Umut Oskay
Umut Oskay 2020년 3월 30일
thanks

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2020년 3월 30일

13 개 추천

When used in a format specifier string, it puts the following stuff on a new line:
>> fprintf('Line 1\nLine 2\nLine 3\n\nLine 4\n')
Line 1
Line 2
Line 3
Line 4

댓글 수: 1

Umut Oskay
Umut Oskay 2020년 3월 30일
it is the best answer i think thank you

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2020년 3월 30일

댓글:

2020년 3월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by