how to export the values from matrix into txt file?
2 次查看(过去 30 天)
显示 更早的评论
hi friends
I have matrix suppose
[100 10]=size(matrix)
I want export the values of matrix in table format in txt
for example the output should look like
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
:
:
thanks for your kind support
0 个评论
采纳的回答
KSSV
2018-1-3
A = rand(7) ;
fid = fopen('data.txt','w') ;
fprintf(fid,[repmat('%f\t', 1, size(A, 2)) '\n'], A');
fclose(fid) ;
Also read about dlmwrite, save.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!