Changeset 1078 for trunk/src/find_field_cells.m
- Timestamp:
- Mar 30, 2020, 3:48:19 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_field_cells.m
r1071 r1078 294 294 end 295 295 else 296 if isfield(CellInfo{icell},'XName') ;% only one coordinate x, switch vector field to 1D plot296 if isfield(CellInfo{icell},'XName') % only one coordinate x, switch vector field to 1D plot 297 297 for ind=1:numel(CellInfo{icell}.VarIndex) 298 298 Role{CellInfo{icell}.VarIndex(ind)}='coord_y'; … … 502 502 for icell=1:numel(CellInfo) 503 503 if isfield(CellInfo{icell},'VarIndex') 504 check_fieldname=0; 504 505 VarIndex=CellInfo{icell}.VarIndex; 505 506 for ivar=VarIndex … … 514 515 if ~isempty(FieldName{ivar}) 515 516 CellInfo{icell}.FieldName=FieldName{ivar}; 517 check_fieldname=1; 516 518 end 517 519 if CheckSub(ivar)==1 518 520 CellInfo{icell}.CheckSub=1; 521 end 522 end 523 if ~check_fieldname% default FieldName 524 if isfield(CellInfo{icell},'VarIndex_vector_x')&& isfield(CellInfo{icell},'VarIndex_vector_y') 525 UName=Data.ListVarName{CellInfo{icell}.VarIndex_vector_x}; 526 VName=Data.ListVarName{CellInfo{icell}.VarIndex_vector_y}; 527 CellInfo{icell}.FieldName=['vec(' UName ',' VName ')']; 519 528 end 520 529 end
Note: See TracChangeset
for help on using the changeset viewer.