Ignore:
Timestamp:
May 20, 2010, 1:48:25 AM (14 years ago)
Author:
sommeria
Message:

many bug corrections and cleaning. Activation of the BW option in uvmat. Improvement of the interaction of get_field with uvmat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_get_field.m

    r81 r89  
    666666            end
    667667        end
    668         if empty_coord_vec_x       
    669                 coord_x_name=DimCell{2};
    670                 SubField.ListVarName=[{coord_x_name} SubField.ListVarName];
    671                 SubField.VarDimName=[{coord_x_name} SubField.VarDimName]; 
    672                 if testold
    673                     eval(['SubField.' coord_x_name '=linspace(Coord_2(1),Coord_2(end),npxy(2));'])
    674                 else
    675                     eval(['SubField.' coord_x_name '=[0.5 npxy(2)-0.5];'])
    676                 end
     668        if empty_coord_vec_x
     669            if numel(DimCell)<2 
     670                errormsg='undefined x coordinate';
     671                return
     672            end
     673            coord_x_name=DimCell{2};
     674            SubField.ListVarName=[{coord_x_name} SubField.ListVarName];
     675            SubField.VarDimName=[{coord_x_name} SubField.VarDimName]; 
     676            if testold
     677                eval(['SubField.' coord_x_name '=linspace(Coord_2(1),Coord_2(end),npxy(2));'])
     678            else
     679                eval(['SubField.' coord_x_name '=[0.5 npxy(2)-0.5];'])
     680            end
    677681           
    678682            if ~testold
Note: See TracChangeset for help on using the changeset viewer.