Get the folder path in GUI
19 ビュー (過去 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!