writing data to a .txt file
1 次查看(过去 30 天)
显示 更早的评论
i have 2 columns of data
a= { 1
2
3
4 }
b= { 5
6
7
8 }
i used
fprintf(f, '%d;%d;\n',[a b]);
i get output .txt file as
1;2;
3;4;
5;6;
7;8;
but i need data in this format
1;5;
2;6;
3;7;
4;8;
0 个评论
采纳的回答
Azzi Abdelmalek
2013-5-23
fprintf(f, '%d%d\n',cell2mat([a'; b']));
更多回答(1 个)
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!