Changeset 851 for trunk/src/series.m


Ignore:
Timestamp:
Jan 19, 2015, 9:29:28 PM (6 years ago)
Author:
sommeria
Message:

various

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r845 r851  
    132132ActionList={'check_data_files';'aver_stat';'time_series';'civ_series';'merge_proj'};% WARNING: fits with nb_builtin_ACTION=4 in ActionName_callback
    133133NbBuiltinAction=numel(ActionList);
     134set(handles.Action,'UserData',NbBuiltinAction)
    134135[path_series,name,ext]=fileparts(which('series'));% path to the GUI series
    135136path_series_fct=fullfile(path_series,'series');%path of the functions in subdirectroy 'series'
    136137ActionExtList={'.m';'.sh'};% default choice of extensions (Matlab fct .m or compiled version .sh
    137 ActionPathList=cell(NbBuiltinAction,numel(ActionExtList));%initiate the cell matrix of Action fct paths
     138ActionPathList=cell(NbBuiltinAction,1);%initiate the cell matrix of Action fct paths
    138139ActionPathList(:)={path_series_fct}; %set the default path to series fcts to all list members
    139140RunModeList={'local';'background'};% default choice of extensions (Matlab fct .m or compiled version .sh)
     
    148149set(handles.RunMode,'String',RunModeList)
    149150
    150 %% list of builtin transform functions in the mebu TransformName
     151%% list of builtin transform functions in the menu TransformName
    151152TransformList={'';'sub_field';'phys';'phys_polar'};% WARNING: must fit with the corresponding menu in uvmat and nb_builtin_transform=4 in  TransformName_callback
    152153NbBuiltinTransform=numel(TransformList);
     
    167168        end
    168169    end
    169     %get the list of previous camapigns in the upper bar menu Open campaign
     170    %get the list of previous campaigns in the upper bar menu Open campaign
    170171    if isfield(h,'MenuCampaign')
    171172        for ifile=1:min(length(h.MenuCampaign),5)
     
    526527    iline=eventdata.Indices(1);
    527528end
    528 set(handles.InputTable,'UserData',iline);
     529set(handles.InputLine,'String',num2str(iline));
     530% set(handles.InputTable,'UserData',iline);
    529531
    530532%------------------------------------------------------------------------
     
    535537xx=double(get(handles.series,'CurrentCharacter')); %get the keyboard character
    536538if ~isempty(xx)
    537 switch xx
    538     case 31 %downward arrow
    539         InputTable=get(handles.InputTable,'Data');
    540         iline=get(handles.InputTable,'UserData');
    541         if isequal(iline,size(InputTable,1))% arrow downward
    542             InputTable=[InputTable;InputTable(iline,:)];% create a new line as a copy of the last one
    543             set(handles.InputTable,'Data',InputTable);
    544         end
    545     case 127  %key 'Suppress'
    546          InputTable=get(handles.InputTable,'Data');
    547         iline=get(handles.InputTable,'UserData');
    548         if iline>1
    549             InputTable(iline,:)=[];% suppress the current line if not the first
    550             set(handles.InputTable,'Data',InputTable);
    551         end
    552 end
     539    switch xx
     540        case 31 %downward arrow
     541            InputTable=get(handles.InputTable,'Data');
     542            iline=str2double(get(handles.InputLine,'String'));
     543            if isequal(iline,size(InputTable,1))% arrow downward
     544                InputTable=[InputTable;InputTable(iline,:)];% create a new line as a copy of the last one
     545                set(handles.InputTable,'Data',InputTable);
     546            end
     547        case 127  %key 'Suppress'
     548            ClearLine_Callback(hObject, eventdata, handles)
     549    end
    553550end
    554551
     
    609606%------------------------------------------------------------------------
    610607% --- Function called when a new file is opened, either by series_OpeningFcn or by the browser
    611 function errormsg=display_file_name(handles,Param,iview)
    612 %------------------------------------------------------------------------ 
    613 %
     608%------------------------------------------------------------------------
    614609% INPUT:
    615610% handles: handles of elements in the GUI
     
    618613%       or 'one': refresh the list
    619614%         'append': add a new line to the input table
     615function errormsg=display_file_name(handles,Param,iview)
     616 
    620617set(handles.REFRESH,'BackgroundColor',[1 1 0])% set REFRESH  button to yellow color (indicate activation)
    621618drawnow
     
    683680    iview=size(InputTable,1)+1;% the next line in InputTable becomes the current line
    684681    InputTable(iview,:)=[{RootPath},{SubDir},{RootFile},{NomType},{FileExt}];
    685 %     SeriesData.ListViewMenu(iview)=zeros(1,nbview)
    686682elseif strcmp(iview,'one') % refresh the list of  input  file series
    687683    iview=1; %the first line in InputTable becomes the current line
     
    702698    SeriesData.FileInfo={};
    703699    SeriesData.Time={};
     700end
     701if iview >1
     702    set(handles.InputLine,'String',num2str(iview))
    704703end
    705704set(handles.InputTable,'Data',InputTable)
     
    14871486    check_create=1; %need to create the result directory by default
    14881487    while detect
    1489         answer=msgbox_uvmat('INPUT_Y-N',['use existing ouput directory: ' fullfile(Param.InputTable{1,1},SubDirOutNew) ', possibly delete previous data']);
     1488        answer=msgbox_uvmat('INPUT_Y-N-Cancel',['use existing ouput directory: ' fullfile(Param.InputTable{1,1},SubDirOutNew) ', possibly delete previous data']);
    14901489        if strcmp(answer,'Cancel')
    14911490            set(handles.RUN,'backgroundcolor',[1 0 0])
     
    18181817    Param=rmfield(Param,'Pairs'); %info Pairs not needed for output
    18191818end
     1819Param.IndexRange.TimeSource=Param.IndexRange.TimeTable{end,1};
    18201820Param.IndexRange=rmfield(Param.IndexRange,'TimeTable');
    18211821empty_line=false(size(Param.InputTable,1),1);
     
    18461846drawnow
    18471847
     1848%% check whether the input file(s) need to be refreshed
     1849% SeriesData=get(handles.series,'UserData');%hidden parameters
     1850% if ~isfield(SeriesData,'i1_series')
     1851%     msgbox_uvmat('ERROR','The input field series needs to be refreshed: press REFRESH');
     1852%     return
     1853% end
     1854
    18481855%% get Action name and path
    1849 nb_builtin_ACTION=4; %nbre of functions initially proposed in the menu ActionName (as defined in the Opening fct of series)
     1856NbBuiltinAction=get(handles.Action,'UserData'); %nbre of functions initially proposed in the menu ActionName (as defined in the Opening fct of series)
    18501857ActionList=get(handles.ActionName,'String');% list menu fields
    18511858ActionIndex=get(handles.ActionName,'Value');
     
    18701877        return
    18711878    end
    1872     [ActionPath,ActionName,ActionExt]=fileparts(FileName);
     1879    [tild,ActionName,ActionExt]=fileparts(FileName);
    18731880   
    18741881    % insert the choice in the menu ActionName
    18751882    ActionIndex=find(strcmp(ActionName,ActionList),1);% look for the selected function in the menu Action
    1876     if isempty(ActionIndex)%the input string does not exist in the menu
     1883    PathName=regexprep(PathName,'/$','');
     1884    if ~isempty(ActionIndex) && ~strcmp(ActionPathList{ActionIndex},PathName)%compare the path to the existing fct
     1885        ActionIndex=[]; % the selected path is different than the recorded one
     1886    end
     1887    if isempty(ActionIndex)%the qselected fct (with selected path) does not exist in the menu
    18771888        ActionIndex= length(ActionList);
    18781889        ActionList=[ActionList(1:end-1);{ActionName};ActionList(end)];% the selected function is appended in the menu, before the last item 'more...'
    1879         set(handles.ActionName,'String',ActionList)
     1890         ActionPathList=[ActionPathList; PathName];
    18801891    end
    18811892   
     
    18851896    if isempty(ActionExtIndex)
    18861897        set(handles.ActionExt,'String',[ActionExtList;{ActionExt}])
    1887         ActionExtIndex=numel(ActionExtList)+1;
    1888         ActionPathNew=cell(size(ActionPathList,1),1);%new column of ActionPath
    1889         ActionPathList=[ActionPathList ActionPathNew];
    1890     end
    1891     set(handles.ActionName,'UserData',ActionPathList);
     1898    end
    18921899
    18931900    % remove old Action options in the menu (keeping a menu length <nb_builtin_ACTION+5)
    1894     if length(ActionList)>nb_builtin_ACTION+5; %nb_builtin=nbre of functions always remaining in the initial menu
    1895         nbremove=length(ActionList)-nb_builtin_ACTION-5;
    1896         ActionList(nb_builtin_ACTION+1:end-5)=[];
    1897         ActionPathList(nb_builtin_ACTION+1:end-4,:)=[];
     1901    if length(ActionList)>NbBuiltinAction+5; %nb_builtin_ACTION=nbre of functions always remaining in the initial menu
     1902        nbremove=length(ActionList)-NbBuiltinAction-5;
     1903        ActionList(NbBuiltinAction+1:end-5)=[];
     1904        ActionPathList(NbBuiltinAction+1:end-4,:)=[];
    18981905        ActionIndex=ActionIndex-nbremove;
    18991906    end
     
    19021909    set(handles.ActionName,'Value',ActionIndex)
    19031910    set(handles.ActionName,'String',ActionList)
     1911       set(handles.ActionName,'UserData',ActionPathList);
    19041912    set(handles.ActionExt,'Value',ActionExtIndex)
    1905     ActionPathList{ActionIndex,ActionExtIndex}=PathName;
     1913%     ActionPathList{ActionIndex,ActionExtIndex}=PathName;
    19061914       
    19071915    %record the user defined menu additions in personal file profil_perso
    19081916    dir_perso=prefdir;
    19091917    profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
    1910     if nb_builtin_ACTION+1<=numel(ActionList)-1
    1911         ActionListUser=ActionList(nb_builtin_ACTION+1:numel(ActionList)-1);
    1912         ActionPathListUser=ActionPathList(nb_builtin_ACTION+1:numel(ActionList)-1,:);
     1918    if NbBuiltinAction+1<=numel(ActionList)-1
     1919        ActionListUser=ActionList(NbBuiltinAction+1:numel(ActionList)-1);
     1920        ActionPathListUser=ActionPathList(NbBuiltinAction+1:numel(ActionList)-1);
    19131921        ActionExtListUser={};
    19141922        if numel(ActionExtList)>2
     
    22592267set(handles.series,'UserData',SeriesData)
    22602268set(handles.ActionName,'BackgroundColor',[1 1 1])
    2261 
    2262 %------------------------------------------------------------------------
    2263 % --- Executes on button press in ActionInput.
    2264 function ActionInput_Callback(hObject, eventdata, handles)
    2265 %------------------------------------------------------------------------
    2266 % if get(handles.ActionInput,'Value')
    2267 ActionName_Callback(hObject, eventdata, handles)
    2268 % end
    22692269
    22702270%------------------------------------------------------------------------
     
    28032803function MenuImportConfig_Callback(hObject, eventdata, handles)
    28042804
    2805 %% use a starting file name for browserr
     2805%% use a browser to choose the xml file containing the processing config
    28062806InputTable=get(handles.InputTable,'Data');
    2807 oldfile=InputTable{1,1};
     2807oldfile=InputTable{1,1};%current path in InputTable
    28082808if isempty(oldfile)
    28092809    % use a file name stored in prefdir
     
    28182818end
    28192819filexml=uigetfile_uvmat('pick a xml parameter file',oldfile,'.xml');% get the xml file containing processing parameters
    2820 %proceed only if a file has been introduced by the browser
    2821 if ~isempty(filexml)
    2822     Param=xml2struct(filexml);% read the input xml file as a Matlab structure
    2823     % ask to stop current Action if button RUN is in action (another process is already running)
    2824     if isequal(get(handles.RUN,'Value'),1)
    2825         answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?');
    2826         if strcmp(answer,'Yes')
    2827             STOP_Callback(hObject, eventdata, handles)
    2828         else
    2829             return
    2830         end
    2831     end
    2832     Param.Action.RUN=0; %desactivate the input RUN=1
    2833     fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters
    2834     SeriesData=get(handles.series,'UserData');
    2835     if isfield(Param,'InputFields')
    2836         ListField=Param.InputFields.FieldName;
    2837         if ischar(ListField),ListField={ListField}; end
    2838         set(handles.FieldName,'String',[ListField;{'get-field...'}])
    2839          set(handles.FieldName,'Value',1:numel(ListField))
    2840          set(handles.FieldName,'Visible','on')
    2841     end       
    2842     if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
    2843         set(handles.ActionInput,'Visible','on')
    2844         set(handles.ActionInput,'Value',0)
    2845         Param.ActionInput.ConfigSource=filexml;% record the source of config for future info
    2846         SeriesData.ActionInput=Param.ActionInput;
    2847     end
    2848     if isfield(Param,'ProjObject') %introduce projection object if relevant
    2849         SeriesData.ProjObject=Param.ProjObject;
    2850     end
    2851     set(handles.series,'UserData',SeriesData)
    2852     if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1)
    2853         set(handles.ProjObject,'String',Param.ProjObject.Name)
    2854         set(handles.ViewObject,'Visible','on')
    2855         set(handles.EditObject,'Visible','on')
    2856         set(handles.DeleteObject,'Visible','on')
    2857     else     
    2858         set(handles.ProjObject,'String','')
    2859         set(handles.ProjObject,'Visible','off')
    2860         set(handles.ViewObject,'Visible','off')
    2861         set(handles.EditObject,'Visible','off')
    2862         set(handles.DeleteObject,'Visible','off')     
    2863     end     
    2864     set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated
    2865 end
    2866 
    2867 
    2868 
    2869 % --------------------------------------------------------------------
    2870 % function MenuImportParam_Callback(hObject, eventdata, handles)
    2871 % %% use a starting file name for browserr
    2872 % InputTable=get(handles.InputTable,'Data');
    2873 % oldfile=InputTable{1,1};
    2874 % if isempty(oldfile)
    2875 %     % use a file name stored in prefdir
    2876 %     dir_perso=prefdir;
    2877 %     profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
    2878 %     if exist(profil_perso,'file')
    2879 %         h=load (profil_perso);
    2880 %         if isfield(h,'RootPath') && ischar(h.RootPath)
    2881 %             oldfile=h.RootPath;
    2882 %         end
    2883 %     end
    2884 % end
    2885 % filexml=uigetfile_uvmat('pick a xml parameter file',oldfile,'.xml');% get the xml file containing processing parameters
    2886 % %proceed only if a file has been introduced by the browser
    2887 % if ~isempty(filexml)
    2888 %     Param=xml2struct(filexml);% read the input xml file as a Matlab structure
    2889 %     % ask to stop current Action if button RUN is in action (another process is already running)
    2890 %     if isequal(get(handles.RUN,'Value'),1)
    2891 %         answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?');
    2892 %         if strcmp(answer,'Yes')
    2893 %             STOP_Callback(hObject, eventdata, handles)
    2894 %         else
    2895 %             return
    2896 %         end
    2897 %     end
    2898 %     Param.Action.RUN=0; %desactivate the input RUN=1
    2899 %     if ~isfield(Param,'InputTable')||~isfield(Param,'IndexRange')
    2900 %         msgbox_uvmat('ERROR','invalid config file: open a file in a folder ''/0_XML''')
    2901 %         return
    2902 %     end
    2903 %     Param=rmfield(Param,'InputTable');% do not refresh Input files and index range
    2904 %     Param=rmfield(Param,'IndexRange'); 
    2905 %     fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters
    2906 %     SeriesData=get(handles.series,'UserData');
    2907 %     if isfield(Param,'InputFields')
    2908 %         ListField=Param.InputFields.FieldName;
    2909 %         set(handles.FieldName,'String',[ListField;{'get-field...'}])
    2910 %          set(handles.FieldName,'Value',1:numel(ListField))
    2911 %     end       
    2912 %     if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
    2913 %         set(handles.ActionInput,'Visible','on')
    2914 %         set(handles.ActionInput,'Value',0)
    2915 %         Param.ActionInput.ConfigSource=filexml;% record the source of config for future info
    2916 %         SeriesData.ActionInput=Param.ActionInput;
    2917 %     end
    2918 %     if isfield(Param,'ProjObject') %introduce projection object if relevant
    2919 %         SeriesData.ProjObject=Param.ProjObject;
    2920 %     end
    2921 %     set(handles.series,'UserData',SeriesData)
    2922 %     if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1)
    2923 %         set(handles.ProjObject,'String',Param.ProjObject.Name)
    2924 %         set(handles.ViewObject,'Visible','on')
    2925 %         set(handles.EditObject,'Visible','on')
    2926 %         set(handles.DeleteObject,'Visible','on')
    2927 %     else     
    2928 %         set(handles.ProjObject,'String','')
    2929 %         set(handles.ProjObject,'Visible','off')
    2930 %         set(handles.ViewObject,'Visible','off')
    2931 %         set(handles.EditObject,'Visible','off')
    2932 %         set(handles.DeleteObject,'Visible','off')     
    2933 %     end     
    2934 %     set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated
    2935 % end
    2936 
     2820if isempty(filexml), return, end % quit function if an xml file has not been opened
     2821
     2822%% fill the GUI series with the content of the xml file
     2823Param=xml2struct(filexml);% read the input xml file as a Matlab structure
     2824
     2825% ask to stop current Action if button RUN is in action (another process is already running)
     2826if isequal(get(handles.RUN,'Value'),1)
     2827    answer= msgbox_uvmat('INPUT_Y-N','stop current Action process?');
     2828    if strcmp(answer,'Yes')
     2829        STOP_Callback(hObject, eventdata, handles)
     2830    else
     2831        return
     2832    end
     2833end
     2834Param.Action.RUN=0; %desactivate the input RUN=1
     2835
     2836fill_GUI(Param,handles.series)% fill the elements of the GUI series with the input parameters
     2837SeriesData=get(handles.series,'UserData');
     2838if isfield(Param,'InputFields')
     2839    ListField=Param.InputFields.FieldName;
     2840    if ischar(ListField),ListField={ListField}; end
     2841    set(handles.FieldName,'String',[ListField;{'get-field...'}])
     2842     set(handles.FieldName,'Value',1:numel(ListField))
     2843     set(handles.FieldName,'Visible','on')
     2844end       
     2845if isfield(Param,'ActionInput')%  introduce  parameters specific to an Action fct, for instance PIV parameters
     2846    set(handles.ActionInput,'Visible','on')
     2847    set(handles.ActionInput,'Value',0)
     2848    Param.ActionInput.ConfigSource=filexml;% record the source of config for future info
     2849    SeriesData.ActionInput=Param.ActionInput;
     2850end
     2851if isfield(Param,'ProjObject') %introduce projection object if relevant
     2852    SeriesData.ProjObject=Param.ProjObject;
     2853end
     2854set(handles.series,'UserData',SeriesData)
     2855if isfield(Param,'CheckObject') && isequal(Param.CheckObject,1)
     2856    set(handles.ProjObject,'String',Param.ProjObject.Name)
     2857    set(handles.ViewObject,'Visible','on')
     2858    set(handles.EditObject,'Visible','on')
     2859    set(handles.DeleteObject,'Visible','on')
     2860else     
     2861    set(handles.ProjObject,'String','')
     2862    set(handles.ProjObject,'Visible','off')
     2863    set(handles.ViewObject,'Visible','off')
     2864    set(handles.EditObject,'Visible','off')
     2865    set(handles.DeleteObject,'Visible','off')     
     2866end     
     2867set(handles.REFRESH,'BackgroundColor',[1 0 1]); %paint REFRESH button in magenta to indicate that it should be activated
    29372868
    29382869
     
    31273058ActionList=get(handles.ActionName,'String');
    31283059ActionName=ActionList{get(handles.ActionName,'Value')};
    3129 % TransformPath='';
    3130 % if ~isempty(get(handles.ActionExt,'UserData'))
    3131 %     TransformPath=get(handles.ActionExt,'UserData');
    3132 % end
    3133 % if strcmp(ActionExt,'.sh')
    3134 %     set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch'
    3135 %     set(handles.ActionExt,'BackgroundColor',[1 1 0])
    3136 %     ActionFullName=fullfile(get(handles.ActionPath,'String'),[ActionName '.sh']);
    3137 %     if ~exist(ActionFullName,'file')
    3138 %         answer=msgbox_uvmat('INPUT_Y-N','compiled version has not been created: compile now?');
    3139 %         if strcmp(answer,'Yes')
    3140 %             set(handles.ActionExt,'BackgroundColor',[1 1 0])
    3141 %             path_uvmat=fileparts(which('series'));
    3142 %             currentdir=pwd;
    3143 %             cd(get(handles.ActionPath,'String'))% go to the directory of Action
    3144 %             %  addpath(get(handles.TransformPath,'String'))
    3145 %             addpath(path_uvmat)% add the path to uvmat to run the fct 'compile'
    3146 %            % addpath(fullfile(path_uvmat,'transform_field'))% add the path to uvmat to run the fct 'compile'
    3147 %             compile(ActionName,TransformPath)
    3148 %             cd(currentdir)
    3149 %         end       
    3150 %     else
    3151 %         sh_file_info=dir(fullfile(get(handles.ActionPath,'String'),[ActionName '.sh']));
    3152 %         m_file_info=dir(fullfile(get(handles.ActionPath,'String'),[ActionName '.m']));
    3153 %         if isfield(m_file_info,'datenum') && m_file_info.datenum>sh_file_info.datenum
    3154 %             set(handles.ActionExt,'BackgroundColor',[1 1 0])
    3155 %             drawnow
    3156 %             answer=msgbox_uvmat('INPUT_Y-N',[ActionName '.sh needs to be updated: recompile now?']);
    3157 %             if strcmp(answer,'Yes')
    3158 %                 path_uvmat=fileparts(which('series'));
    3159 %                 currentdir=pwd;
    3160 %                 cd(get(handles.ActionPath,'String'))% go to the directory of Action
    3161 %                 %  addpath(get(handles.TransformPath,'String'))
    3162 %                 addpath(path_uvmat)% add the path to uvmat to run the fct 'compile'
    3163 %                 addpath(fullfile(path_uvmat,'transform_field'))% add the path to uvmat to run the fct 'compile'
    3164 %                 compile(ActionName,TransformPath)
    3165 %                 cd(currentdir)
    3166 %             end
    3167 %         end
    3168 %     end
    3169 %     set(handles.ActionExt,'BackgroundColor',[1 1 1])
    3170 %      set(handles.series,'Pointer','arrow') % set the mouse pointer to 'watch
    3171 % end
    3172 
    31733060
    31743061function num_NbProcess_Callback(hObject, eventdata, handles)
     
    32573144end
    32583145ref_i=str2num(get(handles.num_first_i,'String'));
    3259 ref_j=str2num(get(handles.num_first_j,'String'));
     3146ref_j=1;%default
     3147if strcmp(get(handles.num_first_j,'String'),'Visible')
     3148    ref_j=str2num(get(handles.num_first_j,'String'));
     3149end
    32603150[ModeMenu,ModeValue]=update_mode(SeriesData.i1_series{iview},SeriesData.i2_series{iview},SeriesData.j2_series{iview});
    32613151displ_pair=update_listpair(SeriesData.i1_series{iview},SeriesData.i2_series{iview},SeriesData.j1_series{iview},SeriesData.j2_series{iview},ModeMenu{ModeValue},...
     
    33753265Mode_Callback([],[])
    33763266
    3377 
     3267%------------------------------------------------------------------------
    33783268% --- Executes on button press in ClearLine.
     3269%------------------------------------------------------------------------
    33793270function ClearLine_Callback(hObject, eventdata, handles)
    3380 % hObject    handle to ClearLine (see GCBO)
    3381 % eventdata  reserved - to be defined in a future version of MATLAB
    3382 % handles    structure with handles and user data (see GUIDATA)
    3383 iline=get(handles.InputTable,'UserData');
    33843271InputTable=get(handles.InputTable,'Data');
    3385 InputTable(iline,:)=[];
    3386 set(handles.InputTable,'Data',InputTable);
     3272iline=str2double(get(handles.InputLine,'String'));
     3273if size(InputTable,1)>1
     3274    InputTable(iline,:)=[];% suppress the current line if not the first
     3275    set(handles.InputTable,'Data',InputTable);
     3276end
Note: See TracChangeset for help on using the changeset viewer.