title: Delete selected rows in uitable - Matlab
body: <p>I built in GUI (using  GUIDE) a uitable (4x5) that last row is logical so I can select lines to delete.</p>
  
  <pre><code>d = {'L1',1,10,true;'L2',2,20,true;'L3',3,30,false;'L4',4,40,true;'L4',5,50,false};
  set(handles.outputTable,'Data',d)
  </code></pre>
  
  <p>I created a button to delete the selectd rows but I does not work:</p>
  
  <pre><code>function deleteButton_Callback(hObject, eventdata, handles)
  % hObject    handle to deleteButton (see GCBO)
  % eventdata  reserved - to be defined in a future version of MATLAB
  % handles    structure with handles and user data (see GUIDATA)
  dataTable = (get(handles.outputTable,'data'));
  
  [m n] = size(dataTable);
  
  disp(dataTable);
  
  for i = 1:m
      if num2str(cell2mat(dataTable(i,4))) =='1'    
        dataTable(i,:)=[];
      end
  end
  
  disp('Modifed table')
  disp(dataTable);
  </code></pre>
  
  <p>How can I fix it so I get set the table again in the GUI?</p>