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 ?

1 view (last 30 days)
data

Accepted Answer

Geoff Hayes
Geoff Hayes on 16 Sep 2014
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.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!