Borrar filtros
Borrar filtros

how to read text file,showing the same formatting as text file....like BOLD,ITALIC

6 visualizaciones (últimos 30 días)
i want to search headings from any text file

Respuesta aceptada

Stephen23
Stephen23 el 16 de Feb. de 2015
Editada: Stephen23 el 16 de Feb. de 2015
According to most common definitions of text files , they do not contain any formatting meta-data such as bold or italic information, so what you are asking for is in itself already a contradiction.
Text files might include formatting information using some kind of markup language , such as HTML or Markdown , in which case you can read this into MATLAB just by reading the text data itself.
If you are actually talking about formatted document standards (such as .doc, .odf, etc), then these do include formatting text data, but the files are in fact binary data and not text data and so cannot be (usefully) imported into MATLAB as text.
MATLAB' standard character data class also only handles raw character encoding (usually two-byte), not formatted strings, so if you need to handle strings with formatting then you would probably need to write your own data class to do this.

Más respuestas (0)

Categorías

Más información sobre Text Data Preparation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by