Open a GUI dialog for selecting a file and return the filename fname, the path to this file fpath, and the filter index fltidx.
flt contains a (list of) file filter string(s) in one of the following formats:
"/path/to/filename.ext"
If a filename is given then the file extension is extracted and used as
filter. In addition, the path is selected as current path and the filename
is selected as default file. Example: uigetfile ("myfun.m")
"*.ext"
Example: uigetfile ("*.ext")
containing a file extension in the first column and a brief description in
the second column.
Example: uigetfile ({"*.ext", "My Description";"*.xyz",
"XYZ-Format"})
The filter string can also contain a semicolon separated list of filter
extensions.
Example: uigetfile ({"*.gif;*.png;*.jpg", "Supported Picture
Formats"})
dialog_name can be used to customize the dialog title.
If default_file is given then it will be selected in the GUI dialog. If, in addition, a path is given it is also used as current path.
The screen position of the GUI dialog can be set using the
"Position"
key and a 2-element vector containing the pixel
coordinates. Two or more files can be selected when setting the
"MultiSelect"
key to "on"
. In that case fname is a
cell array containing the files.
See also: uiputfile, uigetdir.
The following code
uigetfile ({'*.gif;*.png;*.jpg', 'Supported Picture Formats'});
gives an example of how 'uigetfile' is used.
Package: octave