Updated 22 Nov 2010
This convenience function provides one-call read/write access to a flat text or line-based text file using calls of the following form.
content = textfile(filename);
The content can be returned as a char array, or a cell array of lines in the file. Some additional options are provided (see help).
Ben Mitch (2023). textfile (https://www.mathworks.com/matlabcentral/fileexchange/29477-textfile), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.