필터 지우기
필터 지우기

how to get the length of text in matlab?

조회 수: 3 (최근 30일)
sandy sorathiya
sandy sorathiya 2014년 4월 4일
댓글: Jan 2014년 4월 4일
i want to get the function for finding the length of text in matlab?
  댓글 수: 2
Walter Roberson
Walter Roberson 2014년 4월 4일
Are you looking for the number of characters in the string? Are you looking for how many pixels wide are needed to display it? Is the string in MATLAB character format already or is it UTF-8 or UTF-16? Does the string contain UNICODE characters? If so then if there are characters which are not part of the Latin alphabet (used by English) then are the characters represented in composed form or decomposed form?
Jan
Jan 2014년 4월 4일
It could mean the number of text lines also. And if only ASCII is meant, notice, that a line break might be char(10) of char([13,10]), so "length" is not well defined yet.

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

답변 (1개)

Chandrasekhar
Chandrasekhar 2014년 4월 4일
str = 'sandy sorathiya '
len = length(str);%length of the string

카테고리

Help CenterFile Exchange에서 Text Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by