Ignore:
Timestamp:
May 7, 2012, 3:32:21 PM (12 years ago)
Author:
sommeria
Message:

bugs corrected in uvmat: fixed x/y and calc_field for the new PIV data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_field_indices.m

    r404 r411  
    5252function [CellVarIndex,NbDim,VarType,errormsg]=find_field_indices(Data)
    5353CellVarIndex={};
     54
    5455NbDim=[];
    5556VarType=[];
     
    105106    'ancillary','image','color','discrete','scalar','coord_tps'};
    106107NbDim=zeros(size(CellVarIndex));%default
     108if isfield(Data,'VarAttribute');
     109    VarAttribute=Data.VarAttribute;
     110else
     111    VarAttribute={};
     112end
    107113for icell=1:length(CellVarIndex)
    108114    for ilist=1:numel(ListRole)
     
    111117    VarIndex=CellVarIndex{icell};%set of variable indices with the same dim
    112118    DimCell=Data.VarDimName{VarIndex(1)};% list of dimensions for each variable in the cell #icell
    113     if isfield(Data,'VarAttribute');
    114         VarAttribute=Data.VarAttribute;
    115     else
    116         VarAttribute={};
    117     end
    118119    test_2D=0;
    119120    for ivar=VarIndex
     
    181182    VarType{icell}.coord=coord;
    182183    if NbDim(icell)==0 && test_2D %look at attributes Coord_1, coord_2 (obsolete convention)
    183         NbDim(icell)=2;
     184        NbDim(icell)=2;     
    184185    end
    185186    %look for tps data
Note: See TracChangeset for help on using the changeset viewer.