Changeset 45 for trunk/src/struct2nc.m
- Timestamp:
- Mar 15, 2010, 5:39:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/struct2nc.m
r19 r45 102 102 for iattr=1:length(attr_names) 103 103 eval(['attr_val=VarAttribute{ivar}.' attr_names{iattr} ';']); 104 netcdf.putAtt(nc,varid(ivar),attr_names{iattr},attr_val); 104 if ~isempty(attr_names{iattr})&& ~isempty(attr_val) 105 netcdf.putAtt(nc,varid(ivar),attr_names{iattr},attr_val); 106 end 105 107 end 106 108 end
Note: See TracChangeset
for help on using the changeset viewer.