programming for the pathname
조회 수: 3 (최근 30일)
이전 댓글 표시
When I press a push button followed by uigetfile .. after selecting the file .. i need to show the file path in the static Text box .. how can i do this ?
댓글 수: 0
답변 (1개)
Grzegorz Knor
2011년 10월 5일
function test
uicontrol('Style','pushbutton','String','get file','callback',@fclbck)
h = uicontrol('Style','text','String','...','Units','normalized',...
'Position',[.1 .4 .8 .2]);
function fclbck(src,evnt)
[filename, pathname] = uigetfile( ...
{'*.m';'*.mdl';'*.mat';'*.*'}, ...
'Pick a file');
set(h,'String',pathname)
end
end
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!