how can I use a push button callback function to store a data that i get from a uitable into a popupmenu , so that the data (a string) will remain there even i close the gui

1 view (last 30 days)
I have created a uitable, I want the user to be able to modify data of columns then the data of the first column will be saved and sent to the popupmenu using a pushbutton. this is the code of the tabe: f = figure('Position',[200 200 400 150]); dat ={'a',6.125, 456.3457;... 'b',6.75, 510.2342;... 'c', 7, 658.2;} cnames = {'id_ellipsoïde','demi_grand_axe','excentricite'}; rnames = {1:3}; t = uitable1('Parent',f,'Data',dat,'ColumnName',cnames,... 'RowName',rnames,'Position',[20 20 360 100]);
the code to modify a clumns is:
data=get(handles.uitable1,’data’.) data(end+1, :)=0 ; set(handles.uitable1,’data’,data);
and this is was I wrote (following the above code) trying to definitively store the data to the popupmenu that should remain there even after closing the GUI
b=get(handles.popupmenu1,'string'); c=data(end,1); b(end+1,1)=c; set(handles.popupmenu1,'string',d);
The data does not remain in the popupmenu
Thank you

Answers (0)

Categories

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

Community Treasure Hunt

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

Start Hunting!