Changeset 1002 for trunk/src/read_field.m
- Timestamp:
- Feb 28, 2017, 10:41:54 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_field.m
r1001 r1002 175 175 if CheckStructured 176 176 for ilist=NbCoord+1:numel(Field.VarDimName) 177 rank(1)=find(strcmp(ParamIn.Coord_x,Field.VarDimName{ilist})); 178 rank(2)=find(strcmp(ParamIn.Coord_y,Field.VarDimName{ilist})); 179 if NbCoord==3 180 rank(3)=find(strcmp(ParamIn.Coord_z,Field.VarDimName{ilist})); 181 end 182 rank=flip(rank); 183 VarName=Field.ListVarName{ilist}; 184 Field.(VarName)=permute(Field.(VarName),rank); 185 Field.VarDimName{ilist}=Field.VarDimName{ilist}(rank);% permute the order of dimensions 186 end 187 end 177 if numel(Field.VarDimName{ilist})==NbCoord 178 rank(1)=find(strcmp(ParamIn.Coord_x,Field.VarDimName{ilist})); 179 rank(2)=find(strcmp(ParamIn.Coord_y,Field.VarDimName{ilist})); 180 if NbCoord==3 181 rank(3)=find(strcmp(ParamIn.Coord_z,Field.VarDimName{ilist})); 182 end 183 rank=rank(end:-1:1); 184 VarName=Field.ListVarName{ilist}; 185 Field.(VarName)=permute(Field.(VarName),rank); 186 Field.VarDimName{ilist}=Field.VarDimName{ilist}(rank);% permute the order of dimensions 187 end 188 end 189 end 188 190 NormName=''; 189 191 UName='';
Note: See TracChangeset
for help on using the changeset viewer.