Regarding "Saving the data"?

2 次查看(过去 30 天)
Dear All,
I am getting data from NETCDF files as follows:
time=double(netcdf.getAtt(ncFileId,netcdf.getConstant('NC_GLOBAL'),'time'));
data1=...
dat2=..
..
etc
And then save it like this:
data=[time data1 data2..];
data=double(data);
And then it will save as follows:
save(matfile,'data')
But, the data that came out from this is not completed. I mean the size of each matfile that save in this way is around 80k. While it should be ~3000-5000k. So, I am missing some data.
Does anyone knows how to resolve my problem?
I would greatly appreciate your help, Ara

采纳的回答

Walter Roberson
Walter Roberson 2017-1-17
You cannot rely on file size to tell you whether data is missing. Current MATLAB .mat files may contain compressed data. You should use "whos -file" on the file to look to see what variables are in the file and their sizes.
  20 个评论
Ara
Ara 2017-1-20
编辑:Ara 2017-1-20
Thank you for useful documents/links. It helps me to understand. Can I ask you one question? I understand that I can get timetable so that I can arrange time based on hour, which is great. For this, I need to arrange other data based on that as well.
This means that:
Time=seconds(1:3600)'; % this will give me data in one hour. Am I right?
T=timetable(Time, [data in column 1], [data in column 2],...,[data in column 8], 'Variable Names', {'A', 'B',...'H'});
But, my problem is how get 3600 data in column A, as an example, as well? I would know the first 3600 from time represents an hour and then I need to get one hour data, too. So that I can hourly do the analysis.
Can you please give me a hint?
Thank you for all of your great help,
Walter Roberson
Walter Roberson 2017-1-20
retime(T, 'hourly', 'mean') perhaps

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by