1 function h=ncreadandcat(files,vars)
2 % h=ncreadandjoin(files,vars)
4 % files cell array, names of files to read
5 % vars cell array, names of variables to read
8 % h h.vars{i} contains the variable, concatenated along the last dimension
11 [f,dims]=nc2struct(files{i},vars,{});
17 n=length(dims.(field));
18 h.(field)=cat(n,h.(field),f.(field));