Changeset 1048 for trunk/src/find_field_cells.m
 Timestamp:
 Jun 4, 2018, 8:00:50 PM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/find_field_cells.m
r1045 r1048 328 328 end 329 329 for ivar=ind_coord_y 330 330 if check_coord_names(ivar) 331 331 DimRank=find(strcmp(Data.VarDimName{ivar},DimCell_var)); 332 332 check_coord=~isempty(DimRank); … … 396 396 CellInfo{icell}.CoordSize=numel(Data.(CellInfo{icell}.XName)); 397 397 case 'grid' 398 VarName=Data.ListVarName{CellInfo{icell}.VarIndex(1)}; 398 399 if NbDim(icell)==3 399 CellInfo{icell}.CoordSize=[ numel(Data.(CellInfo{icell}.XName)) numel(Data.(CellInfo{icell}.YName)) numel(Data.(CellInfo{icell}.YName))];400 CellInfo{icell}.CoordSize=[size(Data.(VarName),3) size(Data.(VarName),2) size(Data.(VarName),1)]; 400 401 else 401 CellInfo{icell}.CoordSize=[ numel(Data.(CellInfo{icell}.XName)) numel(Data.(CellInfo{icell}.YName))];402 CellInfo{icell}.CoordSize=[size(Data.(VarName),2) size(Data.(VarName),1)]; 402 403 end 403 404 case 'tps' … … 469 470 Cell1DPlot{icell}.XIndex=ind_coord_x(icell); 470 471 Cell1DPlot{icell}.XName=Data.ListVarName{ind_coord_x(icell)}; 472 Cell1DPlot{icell}.YIndex=[]; 473 Cell1DPlot{icell}.YIndex_discrete=[]; 471 474 DimCell_x=Data.VarDimName{ind_coord_x(icell)}; 472 for ivar= [ind_coord_y ind_discrete]475 for ivar=ind_coord_y 473 476 DimCell=Data.VarDimName{ivar}; 474 477 if numel(DimCell)==1 && strcmp(DimCell_x{1},DimCell{1}) 475 478 y_nbre(icell)=y_nbre(icell)+1; 476 479 Cell1DPlot{icell}.YIndex(y_nbre(icell))=ivar; 477 break 478 end 479 end 480 end 481 Cell1DPlot(find(y_nbre==0))=[]; 480 end 481 end 482 for ivar=ind_discrete 483 DimCell=Data.VarDimName{ivar}; 484 if numel(DimCell)==1 && strcmp(DimCell_x{1},DimCell{1}) 485 y_nbre(icell)=y_nbre(icell)+1; 486 Cell1DPlot{icell}.YIndex_discrete(y_nbre(icell))=ivar; 487 end 488 end 489 end 490 Cell1DPlot(y_nbre==0)=[]; 482 491 CellInfo=[CellInfo Cell1DPlot]; 483 492 NbDim=[NbDim ones(1,numel(Cell1DPlot))];
Note: See TracChangeset
for help on using the changeset viewer.