Problem with timestamp and variables combination
1 回表示 (過去 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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File 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!