str2file writes a cell array of strings into a file
Input:
* str ... cell array of strings, i.e. str = {'aa','bbbb','','cc'}
* file ... name of the file, i.e. file = 'test.txt'
* (optional) directory ... destination directory
Output:
* A text file.
Example
Write cell array to textfile.
+ str2file( {'aa','bbbb','','cc'}, 'test.txt' );
See also: file2str
Cite As
Wolfgang Garn (2026). str2file (https://uk.mathworks.com/matlabcentral/fileexchange/11668-str2file), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
Tags
Acknowledgements
Inspired by: Generate help files from m-files, text2speech - tts, file2str
Inspired: cell2file, Generate help files from m-files, file2str, text2speech - tts
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
