필터 지우기
필터 지우기

how save data table with uicontrol button on figure

조회 수: 6 (최근 30일)
alize beemiel
alize beemiel 2020년 10월 3일
답변: alize beemiel 2020년 10월 3일
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',..............????

답변 (1개)

alize beemiel
alize beemiel 2020년 10월 3일
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'')')

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by