Problem with timestamp and variables combination

2 次查看(过去 30 天)
Hello
I have a set of variables generated all the variables are matrixes of 400x1 double while the time stamp is 400x1 uint64 form. When I connect them side by side x=[time,X,Y,..Z] then the data X,Y,Z lose their decimal point and either round up or down. Also the save as ascii is not allowing me to save.
My question is how can I store the data into a variable that will have
timestamp X Y ....Z and then save it as ascii??
an example of the file that I want to get is
e.g 20120101.000000 X Y Z
20100101.000600 X Y Z
This is the code i used for extracting the date and changing in into the format I want
time = double(ncread(a,'time'));
time_offset=datenum(1900,1,1);
new_time=(time/24)+time_offset;
timestamp=datestr(new_time);
timestamp=datestr(new_time,'yyyymm.ddHHMM');
nt=str2num(timestamp);
timestamp=uint64(nt);
thank you very much

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Workspace Variables and MAT-Files 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by