MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   使用一个额外的`names'行将矩阵导出为平面文件 (https://www.labfans.com/bbs/showthread.php?t=26523)

poster 2019-12-14 20:13

使用一个额外的`names'行将矩阵导出为平面文件
 
如何导出第一行告诉列名称的矩阵

喜欢

A= 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 导出到matrix.txt

x1 x2 x3 x4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 我正在检查

dlmwrite('matrix.txt',A,'delimiter',','); 但是如何修改呢?



[B]回答:[/B]

使用'-append'选项:

dlmwrite('matrix.txt', {'a','b','c'}); dlmwrite('matrix.txt', [1,2,3;4,5,6], '-append');

[url=https://stackoverflow.com/questions/5228046]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 20:29

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.