|
Dear all,
I like to append all weather files in a single file, so I use dlmwrite function here. However, the format in the single file did not match up with the original files, even I address the 'precision.' Please advice me.
Thanks,
Michael
The original file format:
2.0040000e+03 1.0000000e+00 0.0000000e+00 0.0000000e+00 0.0000000e+00 2.1210000e+02 0.0000000e+00 2.7155000e+02 2.4000000e+01 9.7640000e+04 3.4985847e-06
2.0040000e+03 1.0000000e+00 0.0000000e+00 3.0000000e+01 0.0000000e+00 2.1140000e+02 0.0000000e+00 2.7155000e+02 2.4000000e+01 9.7640000e+04 3.4985847e-06
The single file format after the process of "dlmwrite"
2004 1 0 0 0 212.1 0 271.55 24 97640 3.498585e-06
2004 1 0 30 0 211.4 0 271.55 24 97640 3.498585e-06
Here is my code to take care of my purposes:
delete('/Users/cks/Documents/Elora/weather/functions/Elora_met04_08_class.dat')
dlmwrite('Elora_met04_08_class.dat',Elora_met04_class,'-append','precision','%0.7g','delimiter','\t');
dlmwrite('Elora_met04_08_class.dat',Elora_met05_class,'-append','precision','%0.7g','delimiter','\t');
dlmwrite('Elora_met04_08_class.dat',Elora_met06_class,'-append','precision','%0.7g','delimiter','\t');
dlmwrite('Elora_met04_08_class.dat',Elora_met07_class,'-append','precision','%0.7g','delimiter','\t');
dlmwrite('Elora_met04_08_class.dat',Elora_met08_class,'-append','precision','%0.7g','delimiter','\t');
|