Changeset 526 for trunk/src/struct2nc.m


Ignore:
Timestamp:
Aug 20, 2012, 12:32:31 PM (12 years ago)
Author:
sommeria
Message:

bugs corrected; Posiibility of usual 1D plots introduced with the new way of using get_field. time_series and aver_stat updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/struct2nc.m

    r404 r526  
    9898            attr_names=fields(VarAttribute{ivar});
    9999            for iattr=1:length(attr_names)
    100                 eval(['attr_val=VarAttribute{ivar}.' attr_names{iattr} ';']);
    101                 if ~isempty(attr_names{iattr})&& ~isempty(attr_val)
     100                attr_val=VarAttribute{ivar}.(attr_names{iattr});
     101                if ~isempty(attr_names{iattr})&& ~isempty(attr_val)&&~iscell(attr_val)
    102102                    netcdf.putAtt(nc,varid(ivar),attr_names{iattr},attr_val);
    103103                end
Note: See TracChangeset for help on using the changeset viewer.