| Contents | Index |
uiopen
uiopen(type)
uiopen(filename)
uiopen(filename, TF)
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.
When you select a file and click open, uiopen does the following:
Gets the file using uigetfile.
Opens the file using the open command.
Files with a file extension of .m open in the Editor.
Variables stored in files with a file extension of .mat appear in the caller's workspace.
Files with a file extension of .fig open as figure windows.
Files with a file extension of .mdl or .slx open as models in Simulink.
uiopen('load') is the only the form of uiopen that you can compile into a standalone application. You can create a file selection dialog box that you can compile using uigetfile.
The uiopen dialog box is modal. A modal dialog box prevents you from interacting with other windows until you respond to the modal one.
uiopen displays the same dialog box that you get when you select Open from the File menu in the MATLAB desktop.
A modal dialog box prevents the user from interacting with other windows before responding. For more information, see WindowStyle in the MATLAB Figure Properties.
Filter to display only FIG-files by setting the Files of type field to Figures (*.fig):
uiopen('figure')

In MATLAB code or in a command:
To open a file appropriately based on its file extension, use the open function.
To open a file in the Editor, use the edit function.
To open a MAT-file and load its contents into the workspace, use the load function.
To open a FIG-file, use the openfig function.
To open a file in an application in Microsoft Windows, use the winopen function.
Predefined Dialog Boxes | uigetfile | uiputfile | uisave
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |