Get the folder path in GUI
조회 수: 20 (최근 30일)
이전 댓글 표시
Hi,
Is there any way allow me to do this:
- Cilck the push button, something like the uiputfile poped up
- I choose certain random path and click 'OK'
- this path will be shown as the static text in my GUI
Thanks!
댓글 수: 0
채택된 답변
awezmm
2019년 8월 8일
편집: awezmm
2019년 8월 8일
Running this:
[file,path] = uiputfile;
returns the selected or specified file path to path.
You can get the fullfile path by doing:
fullfilepath = fullfile(path, file)
You can put the variable fullfilepath into a static text box since it is a string.
댓글 수: 1
Walter Roberson
2019년 8월 8일
However, we recommend not using path as the name of a variable, as that interferes with using the MATLAB function named path
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!