diff --git a/matlab/AUG/gdat_aug.m b/matlab/AUG/gdat_aug.m index 1b9a19ee3239718a3b75bab2ca3795cca0fe156f..3ae36d18548e769f6137de5bd55790c1474094ff 100644 --- a/matlab/AUG/gdat_aug.m +++ b/matlab/AUG/gdat_aug.m @@ -364,7 +364,11 @@ if strcmp(mapping_for_aug.method,'signal') % assume area-base is main 2nd coordinate (did not find a case with 2 area-base (2 coordinates defined in addition to time) to be able to test) i_x = setdiff([1:2],itime); aatmp.dim{i_x} = aatmp.x; - aatmp.dimunits(i_x) = aatmp.area.unit; + if ~isempty(aatmp.area) && isfield(aatmp.area,'unit') + aatmp.dimunits(i_x) = aatmp.area.unit; + else + aatmp.dimunits(i_x) = {''}; + end if isempty(aatmp.dimunits{i_x}); aatmp.dimunits{i_x} = ''; end for i=3:nbdims_eff aatmp.dim{i} = [1:size(aatmp.data,i)];