Changeset 45 for trunk/src/struct2nc.m


Ignore:
Timestamp:
Mar 15, 2010, 5:39:44 PM (11 years ago)
Author:
gostiaux
Message:

adaptation for movies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/struct2nc.m

    r19 r45  
    102102                for iattr=1:length(attr_names)
    103103                    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
    105107                end
    106108            end
Note: See TracChangeset for help on using the changeset viewer.