Get the native operating system and the newline characters for text files
50 téléchargements
Mise à jour 1 sept. 2015

Afficher la licence

Newline characters in text files are differents on Windows and on Unix/Linux/Mac (https://en.wikipedia.org/wiki/Newline)
Even if MATLAB is able to handle this problem properly, it could be useful to determine the end of line for a text file. For exemple when reading the file with the "fread" function and its argument "skip" (constant number of characters per column).

ostxtfile uses the buitlin function "fgets" to return the native operating system on which the file was created. So it should works on any system and on any version of MATLAB.

Citation pour cette source

Jerome Briot (2024). ostxtfile (https://www.mathworks.com/matlabcentral/fileexchange/52784-ostxtfile), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2015a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
En savoir plus sur Files and Folders dans Help Center et MATLAB Answers

Community Treasure Hunt

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

Start Hunting!


Version Publié le Notes de version