GUIでのファイル選択について
이전 댓글 표시
GUIでファイルを選択する時に、2回目以降は前回開いたファイルパスのところを開くにはどのようにすればできますか?
下はコードの一部です
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[FileName1,PathName1] = uigetfile( ...
{ '*.*', '全てのファイル (*.*)'}, ...
'Pick a file','MultiSelect', 'on','C:\');
Bagsheet1 = strcat(PathName1,FileName1);
assignin('base', 'Bsheet1', Bsheet1);
set(handles.edit1,'String',Bsheet1);
1回目の時はC:\のファイル画面が開かれますが、これだと2回目以降も同じになります。
例えば1回目のファイル選択でC:\の開かれたファイルからD:\のファイルで選択した時、2回目のファイル選択画面をD:\になるようにしたいです。
宜しくお願いします。
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 環境と設定에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!