Changeset 258


Ignore:
Timestamp:
Jun 1, 2011, 11:18:33 AM (13 years ago)
Author:
sommeria
Message:

bug repaired for 1D plot (using get_field)

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r248 r258  
    176176
    177177% idimvar=0;
    178 [CellVarIndex,NbDim,VarTypeCell,errormsg]=find_field_indices(FieldData);
     178[CellVarIndex,NbDimCell,VarTypeCell,errormsg]=find_field_indices(FieldData)
    179179if ~isempty(errormsg)
    180180    errormsg=['error in proj_field/proj_points:' errormsg];
     
    186186% icoord=0;
    187187for icell=1:length(CellVarIndex)
    188     if NbDim(icell)==1
     188    if NbDimCell(icell)==1
    189189        continue
    190190    end
  • trunk/src/uvmat.m

    r252 r258  
    28372837    end
    28382838end
     2839if ~isequal(numel(abstime),1)
     2840    abstime=[];
     2841end
     2842if ~isequal(numel(abstime_1),1)
     2843      abstime_1=[];
     2844end 
    28392845set(handles.abs_time,'String',num2str(abstime,4))
    28402846set(handles.abs_time_1,'String',num2str(abstime_1,4))
     
    39974003    else
    39984004        Histo.ListVarName={FieldName,'histo'};
    3999         if isequal(Field.NbDim,3)
     4005        if isfield(Field,'NbDim') && isequal(Field.NbDim,3)
    40004006            Histo.VarDimName={FieldName,FieldName}; %dimensions for the histogram
    40014007        else
     
    40204026        end
    40214027        eval(['Histo.' FieldName '=linspace(Amin,Amax,50);'])%absissa values for histo
    4022         if isequal(Field.NbDim,3)
     4028        if isfield(Field,'NbDim') && isequal(Field.NbDim,3)
    40234029            C=reshape(double(FieldHisto),1,[]);% reshape in a vector
    40244030            eval(['Histo.histo(:,1)=hist(C, Histo.' FieldName ');']);  %calculate histogram
Note: See TracChangeset for help on using the changeset viewer.