[Master Index]
[Index for /tools/hpmatlab/toolbox/matlab/graphics]
uiputfile
(/tools/hpmatlab/toolbox/matlab/graphics/uiputfile.m)
Help text
UIPUTFILE Interactively retrieve a filename by displaying a dialog box.
[FILENAME, PATHNAME] = UIPUTFILE('initFile', 'dialogTitle', X, Y)
displays a dialog box for the user to fill in, and returns the
filename and path strings. A successful return occurs only if
the file does not exist or if the user has given explicit permission
to delete the file.
If the user selects a file that exists, a prompt is issued asking
whether the user wishes to delete the file. A 'YES' response
successfully returns but does NOT delete the file (which is the
responsibility of the calling routine). A 'NO' response will
simply return control back to the dialog box. The user may then
enter another filename, or press the Cancel button.
All parameters are optional, but if one is used, all previous
parameters must also be used.
The initFile parameter determines the initial display of files
in the dialog box. Full file name specifications as well as wildcards
are allowed. For example, 'newfile.m' initializes the display to
that particular file and lists all other existing.m files. This may
be used to provide a default file name. A wildcard specification such
as '*.m' lists all the existing MATLAB M-files.
Parameter 'dialogTitle' is a string containing the title of the dialog
box.
The X and Y parameters define the initial position of the dialog
box in units of pixels. Not all systems may support this option.
The output variable FILENAME is a string containing the name of the
file selected in the dialog box. If the user presses the Cancel button
or if any error occurs, it is set to 0.
The output variable PATH is a string containing the name of the path
selected in the dialog box. If the user presses the Cancel button
or if any error occurs, it is set to 0.
Example:
[newmatfile, newpath] = uiputfile('*.mat', 'Save As');
See also UIGETFILE.
Produced by mat2html on Wed Feb 8 12:25:18 EST 1995
Cross-Directory links are: ON