[討論] Guide中另外寫callback的問題~
我是GUI新手 請問一下大家
我目前是用guide的方式寫GUI
其中有需要浮動的push bottom
所以我在Guide介面設了一個psubottom 裡面的callbak是會產生其他的按鈕
function strucset_Callback(hObject, eventdata, handles)
global handle
global Data
for q=1:Data.L
handle.NK(q)=uicontrol('Style','pushbutton','Units','normalized','Position',
[2*Wid Wid+yy-1.5*(q-1)*Wid2 3*Wid
Wid2],'fontsize',9,'backgroundcolor','w','Callback',????
,'Tag',num2str(q));
end
就是黃色字的部分 問題在於我不知道要怎麼在callback中再寫一個callback = =
我想要讀入一個txt的data檔
[filename,pathname]=uigetfile('*.txt','Load *.txt file');
if filename~=0 % 當filename不為0時
nk=importdata([pathname filename]);
set(gco,'String',sprintf('%s',[filename]));
% 在目前的物件裡顯示此檔案位置
else
set(gco,'String',sprintf('%s',[]));
end
請能人幫我解答 感激不盡~~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.171.35
推
11/25 02:07, , 1F
11/25 02:07, 1F