MATLAB: I am trying to create a gui which includes one table (containing editable columns ) and a push button. i want to get the data which a user enters in the table to a variable when the push button is clicked. how can i do this

uitable

data

Best Answer

Rashmi - if you have created your GUI with GUIDE, then use the handles structure that is the third input to the push button callback to grab the data from the uitable
function pushbutton1_Callback(hObject, eventdata, handles)
data = get(handles.uitable1,'Data')
Here we assume that the push button is named pushbutton1 and that the uitable is named uitable1. data is a cell array containing all data from the uitable.