You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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);
textfile(filename, content);
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).
Cite As
Ben Mitch (2026). textfile (https://www.mathworks.com/matlabcentral/fileexchange/29477-textfile), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.1.0.0 (2.31 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
