Changeset 106


Ignore:
Timestamp:
Jul 1, 2010, 12:01:37 AM (11 years ago)
Author:
sommeria
Message:

merge_proj and series.m: bug for use of mmreader corrected
struct2nc: bug for regularly meshed coordinates corrected (builtin netcdf lib)

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r100 r106  
    20632063         %get the object file
    20642064         defaultname=get(handles.RootPath,'String');
     2065         if isempty(defaultname)
     2066            defaultname={''};
     2067         end
    20652068        [FileName, PathName, filterindex] = uigetfile( ...
    20662069       {'*.xml;*.mat', ' (*.xml,*.mat)';
  • trunk/src/series/merge_proj.m

    r93 r106  
    6464    test_movie(iview)=0;
    6565    if ~isequal(hhh,'')&& mmreader.isPlatformSupported()
    66         if isequal(lower(FileExt{iview}),'.avi')
     66        if isequal(lower(Series.FileExt{iview}),'.avi')
    6767            MovieObject{iview}=mmreader(fullfile(Series.RootPath{iview},[Series.RootFile{iview} Series.FileExt{iview}]));
    6868            test_movie(iview)=1;
     
    158158VelType_val=get(hseries.VelTypeMenu,'Value');
    159159VelType=VelType_str{VelType_val}; %the same for all views
    160 if isequal(FieldName,'get_field...')
     160if strcmp(FieldName,'')
     161    msgbox_uvmat('ERROR','no input field defined in FieldMenu')
     162elseif strcmp(FieldName,'get_field...')
    161163    hget_field=findobj(allchild(0),'Name','get_field');%find the get_field... GUI
    162164    SubField=get_field('read_get_field',hObject,eventdata,hget_field); %read the names of the variables to plot in the get_field GUI
  • trunk/src/struct2nc.m

    r93 r106  
    113113            VarDimIndex=Data.VarDimIndex{ivar}; %indices of the variable dimensions in the list of dimensions
    114114            siz=size(VarVal);
    115             VarDimName=Data.VarDimName{ivar};%NEW
    116             if ischar(VarDimName)%NEW
    117                 VarDimName={VarDimName};%NEW
    118             end%NEW
    119             testrange=(numel(VarDimName)==1 && strcmp(VarDimName{1},ListVarName{ivar}) && numel(VarVal)==2); %NEW
     115            VarDimName=Data.VarDimName{ivar};
     116            if ischar(VarDimName)
     117                VarDimName={VarDimName};
     118            end
     119            testrange=(numel(VarDimName)==1 && strcmp(VarDimName{1},ListVarName{ivar}) && numel(VarVal)==2);
    120120            testline=isequal(length(siz),2) && isequal(siz(1),1)&& isequal(siz(2), Data.DimValue(VarDimIndex));
    121121            testcolumn=isequal(length(siz),2) && isequal(siz(1), Data.DimValue(VarDimIndex))&& isequal(siz(2),1);
    122             if ~testline && ~testcolumn && ~isequal(siz,Data.DimValue(VarDimIndex))
     122            if ~testrange && ~testline && ~testcolumn && ~isequal(siz,Data.DimValue(VarDimIndex))
    123123                errormsg=['wrong dimensions declared for ' ListVarName{ivar} ' in struct2nc.m'];
    124124                break
Note: See TracChangeset for help on using the changeset viewer.