How to remove a row from a Table in the GUI
Mostrar comentarios más antiguos
Hey everybody,
I try to remove a row from the iutable

I wrote the code to add as following :
% --- Executes on button press in add. function add_Callback(hObject, eventdata, handles) data = get(handles.uitable1, 'data'); data(end+1,:) = 0; set(handles.uitable1, 'data', data)
and from it, i derived the code to remove:
function remove_Callback(hObject, eventdata, handles) data = get(handles.uitable2, 'data'); data(end-1,:)= 0; set(handles.uitable2, 'data', data)
I then get the following error statment:

what I am doing wrong here ?
I initialize the Tables values wih a zero matrix a=zeros(3,4). do I need first to delete the last line of a ?
Thank you Paul
1 comentario
Henric Rydén
el 15 de Jun. de 2015
Please format your code.
It seems that you have code for two uitables, uitable1 and uitable2 , but there is only one in the image.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!