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);
Citar como
Matlab Pro (2025). writematrix_with_header (https://www.mathworks.com/matlabcentral/fileexchange/169286-writematrix_with_header), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Se creó con
R2024a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS LinuxEtiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0 |