Effacer les filtres
Effacer les filtres

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

6 vues (au cours des 30 derniers jours)
i want to search headings from any text file

Réponse acceptée

Stephen23
Stephen23 le 16 Fév 2015
Modifié(e) : Stephen23 le 16 Fév 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.

Plus de réponses (0)

Catégories

En savoir plus sur Text Data Preparation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by