newline
새 줄 문자 만들기
설명
c = newline
은 새 줄 문자를 만듭니다. newline
은 char(10)
또는 sprintf('\n')
과 같습니다. newline
을 사용하여 새 줄 문자를 문자형 벡터 또는 string형과 결합하거나, 새 줄 문자에서 텍스트를 분할하십시오.
예제
문자형 벡터 또는 string형에 새 줄 추가하기
newline
으로 새 줄 문자를 만들고 문자형 벡터에 결합합니다.
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'
chr
이 두 줄에 표시되더라도, chr
은 새 줄로 분리된 두 문장을 포함하는 1×73 문자형 벡터입니다.
새 줄 문자를 만듭니다. 그런 다음 +
를 사용하여 새 줄 문자와 추가 텍스트를 string형 끝에 결합합니다.
str = "In Xanadu did Kubla Khan"; str = str + newline + "A stately pleasure-dome decree"
str = "In Xanadu did Kubla Khan A stately pleasure-dome decree"
str
이 두 줄에 표시되더라도, str
은 1×1 string형입니다.
팁
newline
함수는 캐리지 리턴 문자를 반환하지 않습니다. 캐리지 리턴은char(13)
또는sprintf('\r')
과 같습니다.
확장 기능
C/C++ 코드 생성
MATLAB® Coder™를 사용하여 C 코드나 C++ 코드를 생성할 수 있습니다.
스레드 기반 환경
MATLAB®의 backgroundPool
을 사용해 백그라운드에서 코드를 실행하거나 Parallel Computing Toolbox™의 ThreadPool
을 사용해 코드 실행 속도를 높일 수 있습니다.
버전 내역
R2016b에 개발됨
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)