writematrix_with_he​ader

版本 1.0.0 (1.7 KB) 作者: Matlab Pro
writes header + matrix to a file
4.0 次下载
更新时间 2024/7/8

查看许可证

writematrix itself (Matlab builtin function) does not save header lines
writematrix_with_header - allows it
Inputs:
filename - destination filename
header - cell array containing header line(s), each cell = a new header line
matrix - a numeric matrix
varargin - (optional) extra parameters given as inputs to "writematrix"
Example:
filename = fullfile(pwd,'writematrix_with_header_example.txt');
header = {'Hello',['File created @:',char(datetime())]};
matrix = 1:100;
writematrix_with_header(filename, header, matrix);

引用格式

Matlab Pro (2024). writematrix_with_header (https://www.mathworks.com/matlabcentral/fileexchange/169286-writematrix_with_header), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2024a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0