open Open file in appropriate application.
open NAME opens the file or variable specified by NAME in the
appropriate application. For example, variables open in the Variables
Editor, MATLAB code files open in the MATLAB Editor, and Simulink
models open in Simulink.
If NAME is a MAT-file, MATLAB returns the variables in NAME to a
structure.
If NAME does not include an extension, MATLAB searches for variables
and files according to the function precedence order.
A = open(NAME) returns a structure if NAME is a MAT-file or a figure
handle if NAME if a figure. Otherwise, open returns an empty array.
Examples:
open f2 First looks for a variable named f2, then
looks on the path for a file named f2.slx,
f2.mdl, f2.mlapp, f2.mlx, or f2.m. Error
if can't find any of these.
open f2.mat Error if f2.mat is not on path.
open d:\temp\data.mat Error if data.mat is not in d:\temp.
open is user-extensible. To open a file with the extension ".XXX",
open calls the helper function OPENXXX, that is, a function
named 'open', with the file extension appended.
For example,
open('foo.log') calls openlog('foo.log')
open foo.log calls openlog('foo.log')
You can create your own OPENXXX functions to set up handlers
for new file types. open will call whatever OPENXXX function
it finds on the path.