Borrar filtros
Borrar filtros

how to get the length of text in matlab?

3 visualizaciones (últimos 30 días)
sandy sorathiya
sandy sorathiya el 4 de Abr. de 2014
Comentada: Jan el 4 de Abr. de 2014
i want to get the function for finding the length of text in matlab?
  2 comentarios
Walter Roberson
Walter Roberson el 4 de Abr. de 2014
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 el 4 de Abr. de 2014
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.

Iniciar sesión para comentar.

Respuestas (1)

Chandrasekhar
Chandrasekhar el 4 de Abr. de 2014
str = 'sandy sorathiya '
len = length(str);%length of the string

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by