Problem with timestamp and variables combination

조회 수: 1 (최근 30일)
George
George 2014년 2월 6일
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에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by