Skip to Main Content Skip to Search
Product Documentation

uiopen - Interactively select file to open and load data

Syntax

uiopen
uiopen(type)
uiopen(filename)
uiopen(filename, TF)

Description

uiopen displays the dialog box with the file filter set to all MATLAB files (with file extensions *.m, *.mat, *.fig, *.mdl, and *.slx).

uiopen(type) sets the file filter according to the type.

uiopen(filename) displays filename as the default value for File name in the dialog box and lists only files having the same extension.

uiopen(filename, TF) directly opens file filename without displaying a dialog box if TF is true, and displays the dialog box if TF is false.

Tips

When you select a file and click open, uiopen does the following:

Input Arguments

type

String that specifies the kind of file to show in the dialog box (the file filter). Acceptable values for type are the following.

Type stringFiles Displayed
matlabAll MATLAB files (with file extensions *.m, *.mat, *.fig, *.mdl, and *.slx.)
loadAll MAT-files (*.mat)
figure All figure files (*.fig)
simulinkAll Simulink model files (*.mdl and *.slx)
editorAll MATLAB files except for .mat, .fig, and .slx files.

filename

A string, including the file extension, naming a file to open. The filename can be a wildcard character plus extension. For example, *.txt displays a list of all files with the file extension .txt.

TF

A MATLAB expression that evaluates to true or false. If true, filename opens directly, without displaying the dialog.

Definitions

Modal Dialog

A modal dialog box prevents the user from interacting with other windows before responding. For more information, see WindowStyle in the MATLAB Figure Properties.

Examples

Filter to display only FIG-files by setting the Files of type field to Figures (*.fig):

uiopen('figure')

Alternatives

In MATLAB code or in a command:

See Also

Predefined Dialog Boxes | uigetfile | uiputfile | uisave

  


» Learn more
» Download free kit
» Get trial software

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS