目标
我想以下列格式编写.csv文件
1253.7500,1295.5000,-403.7500,1,0.000
1253.7500,1295.5000,-401.2500,1,0.000
1258.7500,1294.5000,-403.7500,1,0.000
1258.7500,1294.5000,-401.2500,1,0.000
1257.5000,1295.5000,-402.5000,1,0.000
代码 如果我使用.csvwrite如下
m = [3 6 9 12 15; 5 10 15 20 25; ...
7 14 21 28 35; 11 22 33 44 55];
csvwrite('test1.dat',m);
type test1.dat
Matlab正确显示如下:
3,6,9,12,15
5,10,15,20,25
7,14,21,28,35
11,22,33,44,55
问题
我想将它导入另一个需要上述格式的程序,但如果我在记事本中打开创建的文件,它看起来像这样:
3,6,9,12,**155**,10,15,20,**257**,14,21,28,**3511**,22,33,44,55
(星星不会出现我用它们突出问题区域,因为这里有两个数字合并)
有没有办法在不发生这种情况的情况下将其写入.csv文件?