开发者

export Matrix with this format MATLAB

How to export any size matrix like

A=
1 2 3 4 5 6 ....9
3 6 7 8 9 9 ....4
...
6 7 7 4 4 5 ... 2

To a file that will contain that matrix where each value is separated by ',':

1, 2, 3, 4, 5, 6, ....,9
3, 6, 7, 8, 9, 9, ...开发者_如何学运维.,4
...
6, 7, 7, 4, 4, 5, ... ,2


Use DLMWRITE. Doing this:

>> A = [1 2 3 4; 5 6 7 8];
>> dlmwrite('file.csv', A);

writes a file with this:

1,2,3,4
5,6,7,8
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜