how save data table with uicontrol button on figure

1 visualización (últimos 30 días)
alize beemiel
alize beemiel el 3 de Oct. de 2020
Respondida: alize beemiel el 3 de Oct. de 2020
hi,
i want to save new value data of table after changing
and i do this withg uicontrol button on figure
i don't want to use guide matlab
i want to use figure with anglet
this is my code
load 'XYZ.out'
load 'conect.out'
h1=figure('Name','Fichier data','Position',[100 60 500 620],'NumberTitle','off');
tabgp = uitabgroup(h1,'Position',[.05 .15 0.9 .8]);
tab1 = uitab(tabgp,'Title','Coordonnées');
tab2 = uitab(tabgp,'Title','Connectivités');
elmn=XYZ(:,1);
Elemt=cellstr(num2str(elmn));
Coord_X=XYZ(:,2);
Coord_Y=XYZ(:,3);
Coord_Z=XYZ(:,4);
Code=zeros(length(XYZ(:,1)),1)
TXYZ = table(elmn,Coord_X,Coord_Y,Coord_Z,Code)%,'RowNames',Elemt);
T=TXYZ
columnformat = {[],'bank','bank','bank',{'000' '111' '001' '010' '100' '110' '101' '011'}};
t=uitable(tab1,'Data',T{:,:},...
'ColumnName',T.Properties.VariableNames,...
'ColumnFormat', columnformat,...
'ColumnEditable', [false false false false true],...
'RowName',T.Properties.RowNames,...
'Units', 'Normalized',...
'ColumnWidth','auto' ,...
'Position',[0, 0, 1, 1]);%,...
ButtonH=uicontrol('Parent',h1,'Style','pushbutton','String','View Data','Units','normalized',...
'Position',[0.4 0.05 0.2 0.075],'Visible','on',...
'callback',..............????

Respuestas (1)

alize beemiel
alize beemiel el 3 de Oct. de 2020
hi
i found a solution
ButtonH=uicontrol('Parent',h1,'Style','pushbutton','String','Sauvegarde Données','Units','normalized',...
'Position',[0.4 0.05 0.25 0.075],'Visible','on',...
'callback','get(t,''Data'')')

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by