what I can make the average of the next nc files?
Show older comments
I have to read some nc files and I'm creating a list as show here:
list_names= cellstr([
'filename_1'
'filename_2'
'filename_3']);
for i= 1:length(list_names)
readfile = char(list_names(i));
getinfo = hdfinfo(readfile);
% Read the files
ncid(i) = netcdf.open(readfile,'NC_WRITE');
IDaod= netcdf.inqVarID(ncid(i),'DATA');
% DATA=squeeze(DATA);
DATAt = zeros(150,162);
DATA= netcdf.getVar(ncid(i), IDDATA);
netcdf.close(ncid);
I have to do the average of the files I'm reading how I can do that?
3 Comments
David Young
on 1 Sep 2011
Please could you format the code in your question using the "{} Code" button to make it readable. (Don't enter a new question or an answer, just edit the existing question.)
Oleg Komarov
on 1 Sep 2011
Interactive tutorial on how to format: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup#answer_18099
E Rodriguez
on 1 Sep 2011
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!