Problem with timestamp and variables combination
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Workspace Variables and MAT-Files en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!