How can I use uigetfile to get the file path?

28 次查看(过去 30 天)
Hello, I was wondering if I could use the function uigetfile to get the complete file path string.

采纳的回答

Image Analyst
Image Analyst 2013-4-12
The documentation for uigetfile() is remiss in not showing any examples that use fullfile() to construct the full file name of the chosen file. Here is how you do it:
[baseName, folder] = uigetfile();
fullFileName = fullfile(folder, baseName)

更多回答(1 个)

Matt J
Matt J 2013-4-12
The 2nd output argument of uigetfile() gives the path info. See
>>doc uigetfile
  1 个评论
Jan
Jan 2013-4-12
Exactly. Reading the help and doc text is a good strategy, when you have questions conderning a command.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 App Building 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by