findstringline

Version 1.0.0.0 (1,44 ko) par Mark
Function finds the lines that a given string is present in a text file.
229 téléchargements
Mise à jour 16 mai 2012

Afficher la licence

I often have to import large data sets broken into chunks within a text file. Each data chunk has a header at its beginning. To identify the lines at which I need to begin importing data, I wrote this code.

So given a data chunk header, say str = 'Event #', this code will return to you every line that the header 'str' is present within. This aids in using the function textscan to import the data chunks. I simply use the line numbers found in this function as the 'SkipLines' for the textscan function.

Citation pour cette source

Mark (2024). findstringline (https://www.mathworks.com/matlabcentral/fileexchange/36732-findstringline), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2010b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Remerciements

Inspiré par : FIND STRING IN A TEXT FILE

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
1.0.0.0